I'd say you could have anywhere around 20-25 'basic' fish in the tank, and that is definitely close to overstocking, but if you have a good filter (such as an aquaclear 50 or along those lines) you should get away with it
these guys include...
corys, tetras, rasboras, small danios, small barbs, guppies and mollies
these guys aren't really "basic" but it's more along the lines of the amount of waste they produce.
This is basically how i stock my tanks...
you can have 1 fish per two gallons, and one more for every 5 gallons (as long as the fish fall under those categories)
so basically, it goes like this...
Fish-Gallons
4-5
7-10
11-15 (you can round up or down)
14-20
etc.
some people might not agree with my stocking, but it's worked out pretty fine for me
also, you can round up a fish, just to even off the school, if you want
and this is basically what i use in mathematical terms
G/2+1=S, and round up
(G = gallons, S= Stocking)
so you can have
22 fish in a 30 gallon, but with a good filter, one or two fish don't make a difference.
(this is for fully stocking, once you fill this, you won't be able to get any more fish, and might find yourself cleaning a lot... it's best to stick a little under the fully stocked line, once you pass 20 gallons.)
that's a lot of stuff to read !