Implement query_result.num_pages, page and total