do ```rest_teams.count``` instead of ```teams.count``` to avoid triggering another query