This is probably very simple but just cant get my head round it

In col G I have a dropdown box as I do in h.

G has

SPI1
SPI2
SPi3
Etc

H has

Admin
NB
ND
Error
Etc

What I want is to use a filter to show all SPI1/2/3 rows and then on another part of the sheet count the number of times admin/nb/nd etc appears.

Im sure it is probably a combination of countif and subtotal but just cant get it straight.

Any help would be appreciated.