I think that's 25,000 Imperial Star Destroyers, i.e. that specific class alone had that many ships produced, alongside thousands of larger "Super Star Destroyers" going all the way up in size to the Executor and Eclipse class ships, and many, many more lighter classes.I always like to see that as "25000 capital ships", which allows innumerably more light vessels. The Imperial Navy could have well over a million warships at its disposal.
Note that EU sources stated that a standard Imperial "Sector Group" consisted of 24 Imperial Star Destroyers as its core assets plus 1600 lighter warships and a total of over 2,400 ships in total, and that's just the local forces assigned to the sector Moff's command -- it doesn't count independent battlegroups like Lord Vader's "Death Squadron" or the massive fleets of larger warships that were seen at Byss in the Dark Empire series.
My personal headcanon / logic, to clearly separate that from what's actually established canon, is that those heavier forces were strategic reserves that could probably only be deployed by command of the Emperor. They only featured in the reborn Emperor arc because he was literally the only one who had the authority to activate any of them -- but unlike the supposed bulk of the NRDF, they actually are canonically seen to exist with such sizes and numbers.