There is no single number, but there are definitely some guidelines to use. As mentioned above, the two limiting factors will be nutrient management/export and behavioral compatibility.
In regards to the latter, some fish like tangs need open water and length to take full strokes to swim freely; without this, they will become stressed and prone to disease and aggression. Additionally, appropriately sized fish fit different niche within an ecosystem. Each niche can be thought of having it's own limit on fish. For instance, bottom dwellers like gobies tend to establish territories and will fight if you have more than 1 or 2 in a tank your size without caring if there is 1 or 100 fish swimming above them. Clowns fill their own niche and more than a single pair will probably fight. Wrasse are open swimmers and you could fit as many as 5 or 6 small fairy or flasher wrasse if that was the type of fish you wanted to feature. Just do a little research about each fish, it's preferred "habitat", and the degree of aggression it has between similar species.
Nutrient export is the next limiting factor. Fish are much more tolerant to liberal tank parameters than coral. If you want to keep coral, especially more difficult coral such as SPS, you need to be more careful about your level of stocking. Sustainable methods of export such as a refugium, skimmer, etc. are going to be your best bet.