Note (don't delete this thanks, this may be reshown):
http://pokemondb.net/pokebase/263215/why-wont-my-pokedex-go-over-399
I've hidden this question in the meantime because it has resolved itself for you, and I doubt many people can provide a sufficient answer.
My best guess in plain English was that there was a counting error within the game, which froze it at a certain point - once an action that changed the numbers in the counting error was completed, the number was recalculated, thus giving you the updated, correct version.
Again, that's a super-simplified version. Someone who does like coding for a living (Pokemaster!) could probably give you a full run down of everything with everything technical.