Fixed COUNT total rows after GROUP BY