Count Pages

I added to this class a method to get the total of pages of the result.
Hope this helps.