Count with grouping in Excel
Many ways.. simplest one (to my view) is to use a pivot table but it depends on your needs..
If you define your data table with a name then it will expand automatically as you add value and a refresh on the pivot will update the numbers