@drMerry - What is similar to you is obviously not similar as far as the algorithm is concerned.
If one day user_none decides on a different or modified approach to calculating apnx files then I will follow suit.
The only alternative I have is to ditch his apnx calculation for mobi and do my own thing for both. The one thing I could do with that is offer a possibly more consistent calculation between books by stripping all HTML markup and then do a calculation based on that like the adobe one of dividing length. I know for performance reasons he constrained his calculation and was limited in his options. However the algorithm does use a lines per page calculation using the markup tags to indicate end of lines etc. Which works well sometimes and clearly not in others depending on how much markup there is and how many 70 character lines there are.
So at least currently a kindle user will get a similar result from the apnx file generated by calibre. If I "go rogue" and do my own calculation then counting the ebook viewer we will have a third interpretation of page count and none any more accurate than the last?