I've never had problems with page counts: I just configured Calibre to send page count data to my Kindle.
Enter Stephen King's IT. (Original epub version.) It looks 100% perfect in Sigil, and except for one tiny thing, it fully validates. Still, page counting is wrong: on the Kindle, the entire book only has 2 pages. All my other books, converted to AZW3, same as this one, work just fine. While looking into this, I discovered this plugin.
I love it's "custom number of characters" feature. I've picked a few paperbacks, and counted how many characters are on one page. It hovers around 2600 with most of them (64-67 characters a line, 40 lines per page). As there is a bit of loss with chapter headings, white lines and half blank pagese, I've guessed 2500 characters and did a calculation. The result is very close; 2-5% more pages than the paperbacks. (I have several books as paperback and as epub).
Close enough for me: now I can actually count on the page numbers to be quite representing of an actual paperback, take or leave 25 pages or so on an actual book that's 500 pages long.
Beautiful plugin. Thanks for creating it.