getBodyCount() returning incorrect numbers?

In my app, I'm calling m_world.getBodyCount() just for testing purposes. But I'm seeing pretty weird results:

Let's say I start with 100 bodies. If I add 10, it goes to 110. When those get deleted, it goes to 90. Every time I do that, it drops by 10, and eventually goes into negative numbers, even though the simulation is still full of active objects that are working properly. Any ideas?

-Ben
I figured this out, I was calling destroyBody on some bodies twice. I'm not sure if it was breaking anything, but it was definitely messing with the body count.

Original thread: https://box2d.org/forum/viewtopic.php?t=7286