WordPress’ ALL post count info on its dashboard does not match phpMyAdmin’s ALL post count!

It all comes down to this.
http://core.trac.wordpress.org/ticket/11889

Behind the scenes, WordPress does generate a place-holder post for your next one! And for that special post, it sets the post_status to a special one, ‘auto-draft’. Basically, the culprit is the post generated by WordPress without your knowledge.

Once you know this fact, it is easy to understand why there is a disconnect. WordPress admin screen’s ALL count info is based on ALL posts except this special one. WordPress’s SQL’s WHERE excludes the post whose post_status=’auto-draft’.

Whereas, phpMyAdmin’s SQL’s WHERE needless to say, totally lacks this condition, and hence we end up with the -1 disconnect between the two ALL post counts, causing guys like me the WTH situation.

So under the hood, the cause of the disconnect is this…

select count(*) from `wp_posts`

vs

select count(*) from `wp_posts` where `post_status` <> 'auto-draft'