Assume that your main data is in column A to C, starting on row 2. Use
cells D1, E1 and F1 to enable you to specify the doctor's name, the
county and the gender respectively, and then put this formula in G1:
=SUMPRODUCT(($A$2:$A$1000=D1)*($B$2:$B$1000=E1)*($C$2:$C$1000=F1))
Just change the values in D1, E1 and F1 to get a different result. You
can also copy the formula down to count values in D2:F2 etc.
Hope this helps.
Pete