I have been asked this twice recently. The first time I just sent the questioner a link to my archives page which lists the current number of publish posts and pages. But the latest questioner explained why they were asking so I thought I would briefly explain. Their curiosity arose from noticing that I use the post number as part of my permalink structure. So, for example, if you look at the url of this post you will see that this is post, or page, number 7,500 and something. But there are only 650 or so posted articles indexed here. The reasons for this big difference are several although I am not sure exactly how this 7,500 number is calculated.
First, WordPress numbers things in order and because of the way WordPress works, many things that never get published do get a number. Once a number is used, it is never used again. Also pages get included as part of the numbering system, not just posts. Someone thought that comments may be included in the numbering system but I think this is not the case as there are almost 7,000 published comments by themselves..
Still if you do the math, adding 650 posts, 20 pages, 7,000 comments, and then some for other miscellaneous items not published, you get well over the 7,500 number total. If you included spam comments in this total you would be way over 15,000. Plus there are all the posts I published but have since deleted that originally were numbered. Those are things like just for fun posts that really serve no purpose beyond the time frame of when they were published, other posts that are outdated soon after publication, and posts that I feel looking back are not contributing to the bank of information stored here. I suspect that in the 6+ years I have been posting here, I have deleted well over 100 items after publication.
So the true answer is I don’t really know how the current number of a post is calculated. But it is fun to believe that some may see the permalinks and think that I have published 7,500 articles instead of 750. I guess 750 is not too shabby though so I am OK with the truth.