Use pagination.pages instead of total_count