This might actually be really expensive. I'm guessing that getting the number of pages requires getting a count() on auth_user in the worst case, and that can be extremely expensive for large tables in InnoDB because of transactional views.