According to http://en.memory-alpha.org/wiki/Registry
, NCC seems to only be for core Starfleet vessels, other registries are used for other purposes. However between 2161 and 2380 ish, there seem to have been 80,000 NCC registries, which would allow for the addition of just under 400 new NCC's per year (average). Given that many starships probably serve for many years - for example Mirandas, Excelsiors, and Oberths, this would not seem an unreasonable number. Even if every ship directly owned by the Federation (as opposed to non Starfleet ships owned by member race governments) had an NCC reg, it shouldn't be too much of a number-crunching problem to keep track of them, even if they are not sorted. For example in RL, look at the way USA registered aircraft are registered, N-xxxx, irrespective of type. USAF aircraft seem to be numbered by a year prefix, then a sequential issue number.
Some grouping by type may occur if a batch of vessels are ordered at one time, for example the NCC-17xx series, but it would seem that, with the exception of legacy registries, eg NCC-1701 and possibly NCC-1305, the reg is simply an accounting tool. I wonder if the Federation would keep NCC-01 as a legacy number also, perhaps as an equivalent of 'Air Force One'. ?