Fix calculation of group visible count