Only the Khoros gods know the answer to that, I can produce like 5 different post counts in various ways, it's quite amazing 😂, choose which one fits you the best... Which one is accurate, no clue... And "half-way" implemented new features like content archive make it even worse, it's just a theory, but I think API v1 does not have any awareness of archived content, so it might "count" all posts? But API v2 does implement content archive somewhat, and it won't return anything that you archived except you explicitly ask via a WHERE visibility_scope = 'archived' constraint, but then of course you don't get the normally visible posts, so you have to do 2 queries because visibility_scope does NOT support WHERE visibility_scope = IN('archived', 'public') constraint... but no worries, you also won't usually get back the same numbers for these two queries:
SELECT count(*) FROM messages
SELECT count(*) FROM messages WHERE visibility_scope = 'public'
and even thinkering around with other visibility scopes like 'moderator' etc. and trying to get somehow to the same count, I was not successful, so please, if you find the "formula", let us know!
There's of course also the metrics section you could try and get some more different numbers... it of course depends which metric you are querying, in your case I think relevant ones could be:
- net_overall_posts
- net_posts
- deleted_posts
- deleted_overall_posts
- posts
- overall_posts_excluding_spam
- overall_posts