In wartime (as in the Dominion War), the bulk of the fleet would be concentrated into various combat divisions/wings/fleets/whatever. In peacetime, they would be scattered far and wide going about exploration, patrol and scientific duties, hence the "only ship in the quadrant/sector" phenomenon. (Remember, the Federation sphere of influence extends throughout most of the Alpha Quadrant.)
At the height of the DW, The Dominion was fielding a fleet of over 20,000 ships (outnumbering the Klingons 10-1). The Klingon fleet at that time was ~1100-1300 ships IIRC, meaning the rest of the Alpha Quadrant alliance's forces were split primarily between the Romulans and the Federation.
Assuming an even split (not a given, the Romulans are traditionally thought to be somewhat resource-poor), That would put Starfleet's contribution at ~8800 ships of various classes. This after almost two and a half years of continuous armed struggle (first against the Klingons then the first part of the DW). We know canonically that Starfleet losses in the initial stages of the DW were easily 85-90%+ per operation (such as what happened to the 7th Fleet).
I would suggest therefore that Starfleet's pre-war strength was easily at least 12-14,000 ships, and quite possibly more.