...And the one thing about Star Trek we have to remember is that Starfleet is not
an organization capable of meeting the demands placed on it.
We can't calculate fleet size by calculating how many ships would be needed to patrol the borders of the UFP, because Starfleet is incapable of patrolling them - all sorts of stragglers always get through. We can't calculate how many ships would be needed to respond to crises at colonies, because Starfleet arrives too late just as often as it arrives in the nick of time. Starfleet doesn't have the ships necessary for surveying all the planets within the Federation, or for monitoring all the spacelanes for smuggling or traffic accidents or whatnot.
Since Star Trek drama is driven by Starfleet's shortage of ships, we must deduce that it's very difficult or expensive to build starships, or then to operate them, and that Starfleet has to make do with too little, both in peace and in war. Which is less than helpful in establishing Starfleet numbers, but at least it rules out the very high ones.