alter count query according to the currently authenticated user