Salve si può contare il numero di record presenti in una tabella in base alle varie categorie presenti:
es.

categoria|prodotto|
-------------------
cat1 |prod1 |
-------------------
cat1 |prod2 |
-------------------
cat2 |prod3 |
-------------------
cat2 |prod4 |
-------------------
cat1 |prod5 |
-------------------

e avere come risultato:ù

categoria 1 tot = 3
categoria 2 tot = 2

e grazie