Tropical saltwater aquarium fish come from one of the most stable environments on Earth. Significant changes in chemistry and temperature rarely happen. This makes them sensitive to water quality in the home aquarium. One way to prevent poor water quality is to avoid overstocking your fish tank.
This rule has many variations, but the most common version holds that you should stock 1 inch per 2-5 gallons of water. This means a 30-gallon tank could hold 6 to 15 1-inch fish, or 2 to 4 3-inch fish. However, when a fish gets larger than 3 inches, this guideline rapidly breaks down, since 10 1-inch fish are smaller than one 10-inch fish. For example, it wouldn't be a good idea to keep more than one 6 to 8 inch lionfish in a 30-gallon tank.
The idea that a fish grows to the size of its aquarium is a dangerous urban legend. In the early days of fish keeping, people noticed that fish in small tanks tended to stay smaller than fish in larger tanks. This was because fish waste built up more quickly in smaller tanks and stunted the smaller fish's growth. While you most often hear this about freshwater fish, particularly goldfish, it is not true and you should never stock you tank on any variation of this reasoning.
Don't forget to consider other factors than size. For example, a yellow tang is more active than most fish. As such, it produces more fish waste, so you should budget slightly more room for it (use the higher end of the 2-5 gallons) than a less active fish. Also, aggressive species require more room than peaceful fish. Lastly, newly assembled tanks can hold fewer fish than established tank. This is because beneficial bacteria are the main thing that break down fish waste in an aquarium, and they take time to build up enough to keep the water safe.
Stocking saltwater invertebrates requires its own set of rules. At a glance, coral doesn't seem like it requires much. However, they are animals and can "attack" each other with stingers or even water-borne poisons. To avoid this, research your particular species and give them room. To estimate how much room, observe your coral at night; many species extrude stinging tentacles at night. This will give you a better idea of how close stinging range is.
- Yellow puffer fish image by Stevo from Fotolia.com