With all the older ships in the fleet, that always suggested to me that Starfleet may not be as industry rich as it is made out to be.
Assuming of course the Federation economy works anything like ours. .
Given it's large number of members and their distance from each other, likely the federation has hundreds (or thousands) of separate economies. Instead of one big one. But brian577 brings up a good point, if the federation's "economy" is different from ours to the point that perhaps it actually doesn't work particularly well, then the continued existence of ships in Starfleet that are several decades old begins to make sense. They can't afford to replace them.
Yes, a
relatively small number of new ships are being constructed, Galaxy Class and the like. But it would be like if the bulk of the US navy were vintage World War Two ships and Cold War era ships, supplemented by a limited amount of younger ships. Shelby's statement of forty new ships in a year might be an indication of the federation's maximum ship building capacity.
In addition to the federation fleet, some individual members would also have their own, entirely separate, fleets. Capable of dealing with small problems like pirates and isolated BOP's wandering across the boarder. Some of the wealthier members, with large, wide spread colony systems, could have fleets of significant size. As the Dominion War continued, the expanding size and numbers of fleets could have been composed of, not only Starfleet ships, but members "home fleets."
A third group of ships might be a "mothball" reserve fleet.
That's like 3 ships per task force isn't it?
A task force can have two ships, or hundreds. Task forces are usually temporary formations. Once they've served their purpose they are broken up and new ones formed.
--------------
In addition to the big, multi-mission, combat capable ships in Starfleet, there would be a fairly large number of specialty ships (thousands?), like support, science, cargo, passager, etc.