I have a single table as shown below:
ID | Name | Category
--------------------
1 | Cat | Mammal
2 | Dog | Mammal
3 | Pea | Vegetable
4 | Snake| Reptile
I would like an SQL query that will list each individual item with the count of the elements in its category. i.e.
Name | Count of Category
-------------------------
Cat | 2
Dog | 2
Pea | 1
Snake | 1
Edit1: I am using postgrsql