finish team count query