more robust total_count for Pages.all