Hi Josh, good point! This question comes up so frequently in one of its variants (detecting page break locations, getting page numbers for table of contents etc.) that I can see I didn't give it any fresh thinking for this particular use case :)
As I understand it, Word writes that attribute on each save. So the first thing I would look for is a document that Word hadn't touched yet, like perhaps one converted from another format or maybe one generated by Google Docs or something. The other thought that occurs to me is that Word might only update this when a document is paginated, and that might only happen in page layout view or when the document is printed; so perhaps if the document was modified significantly in Draft mode it might not get updated.
All these are speculation though, I don't have much insight into Word internals as far as rendering is concerned. I would consult my friend Google on this one I suppose, it's possible that someone who uses Word a lot has come across it somewhere along the line :)
How far off are the numbers you're finding? Like 1 instead of 20 or more like 22 instead of 20? It occurs to me that locale/printer setup, especially Letter vs A4 could figure in as well. LibreOffice vs. Word could also be a factor.
Would also be interesting to know whether the discrepancy persists once the file is opened and then saved under a different name without making any changes.
--Steve