Well it really determined by your algae problem but as a bench rule I use 1 snail per 2 gallons and 1 hermit per 4 gallons. It has worked for me! Also I don't use hermits in my bare bottom tanks.
yeah Tike dood is right, 1 snail per 2 gallons if you got a lot of algae, if not i'd go more like 1 per 4 , now for the hermits hmm i wouldn't add to many to your tank just a couple of them because everytime they molt, they like to kill snails and use their shells even if there's empty shells sometimes.
Also, be careful on what species you mix. Some hermits as they grow, need to change out their shells for bigger ones to accomodate their size and will usually kill another hermit or snail to take over their shell. Sometimes, people will add an assortment of different sized empty shells in their tanks for such times as these. Good luck!
I start with about 1 snail per 10 gallons of water, but use species that reproduce in captivity like Cerith and mini Turbos. They then reproduce to a level which balances out with the amount of algae.