support for tag pages in getPageCount

currently getPageCount only return number for the index pages.
I added support for tag pages as well, so if you have pagination on those it will work as expected.