Oh, this is a can of worms, make no mistake!
I don't think you'll go far wrong if you use 'one inch of fish to one gallon of water' as a guide, especially in your case, as it works only for small bodied tropical fish that don't get to over three inches adult size. Obviously with bigger fish it goes badly wrong; it would be ludicrous to suggest that a 10 inch oscar could go in a 10 gallon tank!
I actually prefer 'one inch of fish to every 12 square inches of water surface', as that is a more important limiting factor on stocking than volume. It also means that if you're talking standard, foot wide tanks, the amount of fish is the length of the tank, so it's nice and easy to work out (so, a standard 36"x12"x15" will take 36" of small fish). It's still easy to work out for other size tanks though (length of tank x width of tank/12)
Use both those methods and it'll give you some understanding of roughly what amount of fish you're you're looking at having anyway.
Edit; I should have said; you must use the eventual, adult size of the fish for doing these calculations; thanks for reminding me to point that out, micko!