I think that a lot has to do with filtration and plant load. The more filtration and plants, the more fish and inverts you can safely keep.
In general, I keep my tanks filtered twice as much as "recommended" and follow the "1 inch fish per gallon of volume" rule. For me, that would be 200 inch long fish. However, I do keep it heavily planted and have double the filtration than I really need, so I figure that I could keep 300 fish in there, if I wanted to, or 200 medium size fish (like rummys), or 100 larger fish (like angels). Or, I could safely keep 1000 RCS's.
Also, if you have a tank crammed full of slow growing plants (like anubias or mosses), these plants are going to utilize the wastes produced by fish as quickly either. If you have fast growing plants (like hygros) jammed into your tank, you could likely add more fish as these plants will absorb and biochemically change the wastes and produce for them to consume (or harmless by products).
In addition, if you add more filtration, you would want to utilize carbon or some other biomedia to produce extra "volumes" of bacteria to keep the water clean. I do not use carbon, so I would want to watch how many fish I put into my aquarium, even though I have it heavily planted and have more filtration than I need.
Aquarium size, too, counts. My current tank has a base of 4 feet by 4 feet with an average substrate depth of about 5 inches; in this fashion, I know that my bacterial count in my substrate should be pretty high (which is why I don't use carbon in my filtration). However, if you are dealing with a tank with a smaller footprint of 4 feet by 2 feet, you are dealing with half the volume of my tank (in comparison), so your bacterial count theoretically reasons will be half of what I have. This is also another consideration when it comes to stocking a tank.
There are likely many other factors to consider as well. Is this a high tech tank with a ton of CO2 and ferts added to it? Is this a NPT with no CO2 or ferts? Do you have high light to make the plants grow at a faster rate thereby increasing the nutrient uptake? Do you have substrate or is it bare bottom for breeding? On that note, would you plan on allowing whatever fish or inverts in there to spawn and try to rear fry/shrimplets, or would you remove the fry to a different tank?
I would think that these would all be factors in deciding, ultimately, how many fish you would wish to try to add.