In a 20 high without utilizing the upper space I'd say 6...in a long or a high with lots of climbing things and/or shelves and hammocks I'd say up to 10 (only small mice, like pet store mice, though). But that's just my opinion.
I'm not a fan of the "general rules of thumb" for size/space requirements. The 1 fish per gallon rule is extremely misleading (the "rule" is really 1" of fish per gallon anyway...not 1 fish per gallon...a 6" fish makes a lot more of a mess than a 1" fish...). That rule only works with non-carnivorous, non-messy fish that only reach the 2-3" size range as adults, in regular freshwater, with a filter rated for that size tank. Smaller fish or a larger filter can hold more fish....larger fish or a smaller filter can hold less fish...saltwater and brackish support less fish...planted tanks may support more or less fish depending on the plants and density......the list goes on and on of ways that that rule does not apply.