You would use the Subtotal function rather than the countif function to perform calculations on a filtered set..
In Cell A4: =subtotal(2,$B$6:$B$13)
This assumes you have filtered your set to show only the things you want to count. The #2 in the function is what operation you perform on the visible cells. Operation 2 is Count.
Keep Up with TechRepublic