Add methods and tests for counting tokens by page and by document per page.