And then to throw a spanner into the mix there's Shelby and her plan to replace the 40 ships lost at the Battle Of Wolf 359
SHELBY: We'll have the fleet back up in less than a year.
Maybe she was just being humorously optimistic?
The thing is, the 40 ships lost at Wolf 359, and Shelby's comment that they will all be replaced within a year, really doesn't make sense in the context of the larger picture of what we see later in DS9.
At the time "Best of Both Worlds" was being produced, 40 seemed like a pretty large number at the time. We were probably meant to assume that Starfleet had around 100 or so ships total, so the loss of 40 of them would be quite devastating (not to mention that the losses seemed to encompass their more advanced ships like the Nebula, Challenger, Springfield, New Orleans, Cheyenne, Freedom and Niagara classes). We were probably also meant to assume that the 'replacement' ships were the four new classes we saw in First Contact, along with the Defiant class, even though their registry numbers don't seem to jibe with this. I make this assumption based on those ships' attributes being similar to the brand-new Sovereign class, and the fact that they were the primary ships attacking the Borg cube in that movie, as if they were specifically built to do so.
But then we see multiple fleet shots in DS9 during the Dominion War, and the primary ships making up that fleet are three of the aforementioned FC ships, and the Excelsior and Miranda classes, with only a small smattering of Galaxy, Nebula, and Defiant classes. We also learn that there are at least ten different fleets engaging in the war, with the seventh fleet containing over a hundred ships. So if that's a general estimate of fleet size, we're looking at well over a thousand ships. The conclusion being that either:
1. Starfleet built a thousand ships to replace the 40 lost at Wolf 359 (including obsolete designs), or
2. Most of those ships (especially the Excelsior and Miranda classes) were already in existence at the time of BoBW, in which case both the 40-ship loss being so devastating and Shelby's remark about replacing them in a year makes little sense, not to mention: Where were all those ships during BoBW if Starfleet could only scrounge up 40 of them?
Shelby doesn't say they'll have
part of the fleet replaced; she doesn't say they'll recommission mothballed ships. She says "We'll have the
fleet back up in less than a year." This statement implies that those 40 starships made up the bulk of Starfleet's forces, and that they will all be replaced with brand-new ships in a very short time. Even if those hundreds of Excelsiors and Mirandas we saw in DS9 were originally decommissioned prior to BoBW, it still makes Shelby's statement nonsensical. If Starfleet can replace the bulk of their destroyed fleet (40 ships) in less than a year with 1,000 new ships, why did they even need all those old obsolete Excelsiors and Mirandas in DS9? And if those old ships were still good, why is the loss of only 40 ships so devastating?
And as an addendum: To add insult to injury, Admiral Cornwell in DSC states that in the 2250's, Starfleet had 7,000 ships. So Starfleet had 7K ships a century prior, but losing 40 a hundred years later is a big deal?