Added query for team counting per worker.