[PRD-4216] CountForPages function produces incorrect results.
[Prd-4216] Corrections from review.  Also added a gold test report.
Merge pull request #51 from mkambol/prd-4216

[Prd-4216] Total page count function produces incorrect results.