Hi, need help for the following COUNTIFS function
Basically, want to figure the count of names on basis of how many times the name is in a specific month. You can refer the formula on picture below for clarity. Thanks!

Following is the data table:
| Name | Month |
| A | 8 |
| B | 8 |
| C | 8 |
| D | 8 |
| G | 8 |
| H | 8 |
| A | 8 |
| B | 8 |
| C | 8 |
| F | 8 |
| G | 8 |
| A | 8 |
| C | 8 |
| D | 8 |
| A | 9 |
| B | 9 |
| C | 9 |
| D | 9 |
| E | 9 |
| F | 9 |
| G | 9 |
| H | 9 |
| H | 9 |
| H | 9 |
| H | 9 |
| E | 9 |
| J | 10 |
| K | 10 |
| F | 10 |
| G | 10 |
| J | 10 |
| K | 10 |