In normal circumstances you probably never reach 10000000
Since at that point you would have spawned every creature spawned by default about 100 times. And even with holes in the counting (unused guids) that would be very excessive spending and would probably be best to try squish the guids if possible.
(remove unnecessary NPCs and remove holes from the guids in the table)
As the error describes, the assert was launched by guid exceeding 16777214. Stay under it. And you should stay way under it, since each spawn of creature also spends a guid. The less there is space to spend guids at the top, the often you need to restart (or crash) to re set the guid counting.
LilleCarl made a very interesting code for reguiding on mangos forums that is a very good way to reguid.
I wouldnt use it for original TC spawned guids though, just the custom ones and hope nothing is linked to some unknown table or some C++ script.
The code would need some modifications though to work with SAI and negative guids maybe. So many tables and columns around.
There are also other utilities you might be interested in:
Read these before trying anything:
http://www.trinitycore.org/f/topic/10188-guid-overflow/
http://www.trinitycore.org/f/topic/...-re-guid-multiple-tables-not-creature-spawns/
http://cmangos.net/thread-823.html