Most things in the hobby have no real rule set in stone. However, many people "need" some sort of rule or guideline to follow by to make them feel better and at ease when doing something they are unsure about.
With that being said, the rule for CUC can vary from 1 per gallon to 1 per 2 gallons. However, this is most definitely NOT necessary to follow! Those are just guidelines that people have come up with for the types of people who "need" this sense of rules to proceed.
Each individual's aquarium will happily accept a different number of CUC inhabitants. You just have to see what amount fits for you. Larger organisms generally means you want less of. Smaller means you can have more of. So if you go purely on small hermits and small snails, then start with 10 or so (combined) and escalate from there. Monitor your aquarium and see if there's a lot of food to go around for them all. If you feel like you need more, add more (maybe 5 more? Or whatever you feel comfortable with). If you go for larger organisms like starfishes or large shrimp species, then perhaps you want to get one shrimp, one star (make sure it's reef safe if you're building a reef tank) and 5 hermits?
Mix and match. Take size into account and know that these guidelines do not work for everyone. Take it with a grain of salt and modify it accordingly.