Updated pagination to include count of total results