Adding count in nested query for members