I'm googling, and I do think those numbers include everything in the Federation, even like shuttecraft, runabouts, freighters, passenger ships, and everything in between. I'm reading even for like deep space nine I all estimates I'm finding are like up to twelve hundred starfleet starships at the most, I do feel that's like the upper limits of interest at all for me.I was curious about this so I googled a bit and there is some speculation by fans that the fleet could be in the 30,000-50,000 range. I'm sure it's mostly just speculation though based on events from the Dominion War.
I keep going back to what is said at the end of Best Of Both Worlds. The implication is that the fleet was severely weakened by the battle at Wolf359 and that it would take some time to get it back up to strength. If you take that as fact, then it's hard to believe the fleet by the time of the Dominion War was 30 to 50 K.
On the other hand, I believe those numbers include all ships, even small stuff like shuttles. In that event, those numbers could be viable.