se ho capito bene:

codice:
SELECT COUNT(nome) AS elementi, gruppo FROM tabella GROUP BY gruppo