minor query update for count