There are probably between five and eight thousand ships of the line in Starfleet in TNG era. Before the Dominion War, it is probably around the higher figure, and afterwards it's probably the lower figure.
See I don't get this idea that the Federation had fewer ships in commission at the end of the war.
Historically wartime fleets are always massively larger than their peacetime equivalents. Even Starfleet has some limitations on resources, and cannot have fleets of 500 ships each sitting around in peacetime.
I would expect Starfleet probably doubled in size during the Dominion War, probably lost overall around 3000 odd ships of all sizes by the end, but would likely have built as many if not more.