The number of fish in a freshwater aquarium varies significantly by fish type. As a general rule of thumb, there should be one inch of adult fish per gallon for fish under 6 inches a piece as adults.
Most fish are sold as juveniles. Aquarium capacity must be based on average adult size, not their size at purchase. Some species of fish require more space than one gallon per inch, particularly territorial fish such as cichlids. Fish that grow to over 6 inches need an aquarium that is at least two times as wide and four times as long as the adult length of the fish.