Weird behaviors of SQL

I have a question about this exercise. When you use COUNT(*) with GROUP BY, the system seems to automatically know that you are counting the numbers in each category, not the total number. What if I group by some fields that are never repeated in the table? Will this force the system to count all entries?