According to The Making of Star Trek
the creators / producers envisioned - possibly as an analogy to the US Navy's aircraft carriers, then - 12 top-of-the-line starships like the Enterprise
If we take a closer look at the NCC registries of the Excalibur
(1664), the Defiant
(1764) and the Reliant
(1864) it could seem it is essentially just a contact code where - in the aforementioned example and according to Matt Jefferies' design series nomenclature (Enterprise
is 17th design) - the last two digits of the Excalibur
were "inherited" by the Defiant
which again were inherited by the Reliant
Thus it would be impossible to determine Starfleet's actual strength at TOS, add to this we had ships of the "Destroyer Class" (Kirk's first command according to TMoST) etc.
There's one example in TOS where the Enterprise
revisits a region "where they charted several systems last year". Looks like the ships had assigned patrol sectors and it looks the Enterprise's
was close to Klingon and Romulan territory.
Of course, as the United Federation of Planets expanded the patrol sectors became more or bigger and unless sensor and scanning equipment became equally better the Federation was probably in need for more ships to cover vaster regions of space and - at some point in time - the availability of just 99 contact codes for top of the line starships (and others?) would not have been sufficient, hence the new five digit codes.
Just my 0.02 $ for what it's worth.