+1 to Byron, it really depends on the species. I have glowlight tetras and am slightly overstocked on them, but they are a shy, peaceful species and though they can dart at vision-blurring speeds, they do not generally lap the tank and I can get away with a bigger school of them. They also do well with my heavily planted setup and moderate current.
I almost always recommend under stocking for the gallon size of a tank unless you have a compelling reason not to and filter/water change/plant it to suit the bioload of the fish. Otherwise I'd get a school of 15-20 tetras unless the specific species has requirements vastly different than most schooling characins, and you can always add to the school if you find yourself more conservatively stocked than you need to be.
Cardinals can be movers and shakers, so I wouldn't do a gallon per fish, myself. You wouldn't be overstocked in terms of bioload, but it may stress the fish to have an overly large school of them. Remember you can always add more, but taking them away is a bit harder ;)