Did you send you a report to the Funcom help service ?
The decrease of NPCs has nothing to do with that of the buildings, the counters are separated.
Are the NPCs posted to the craft tables still?
There are three possibilities (those I know)
1- Famine
2- The NPCs fallen through the mech
3- The NPC limit was reached and the server increased the NPCs in surplus
Unfortunately, I cannot help you anymore, I advise you to contact FUNCOM support. Good luck