Although I think they overdid it. TNG has a 30-40 ship battle at Wolf 359 and this is supposed to be a big deal, but then in DS9 we have a 600-strong UFP/Klingon fleet at some point. It's awesome, but a bit exaggerated, imo.
I suspect the difference is in the time for preparation, particularly for very different situations.
The Borg pretty much walked right up to the Federation's front door, and the fleet was caught out of position. The Federation's starships are apparently off doing their own things usually, if the Enterprise
's missions in TNG are anything to go by. So the whole fleet is spread throughout the Federation and the frontier typically, and gathering over three dozens ships in one place at short notice has to be difficult. Consider that after the crisis is over, Shelby is confident that they'll have the fleet back up to strength in a year or so - that's after losing 39 starships. It would seem, then, that 39 ships aren't a significant fraction of the fleet, if they're able to replace them that fast. The Federation may be building that many ships a year anyway
During DS9, there was a cold war with the Dominion; tensions were building up and the Federation had time to recall ships and redeploy entire fleets to protect worlds. If it took some far-flung starships a few months to return to Federation space, well, that's all right, because the shooting hadn't started yet and hopefully wouldn't happen. The admiralty had hundreds of ships ready when the shooting started, though.