One way you can do this is to do an evaluation in a new column, then check the output value with your countif statement.
In one column have it determine whether or not both criteria are met:
=IF(AND(B2 = SOMETHING, D2 = SOMETHING_ELSE),"TRUE","FALSE")
What this does is says that if B2 is equal to SOMETHING and D2 is equal to SOMETHING_ELSE, return the string "TRUE", if both conditions are not met than return the string "FALSE".
So if we put the formula above in column G the countif would look something like:
=countif(G:G,"TRUE")
Anything which returned a string "TRUE" will be counted, and the ones which failed the AND criteria and returned the string "FALSE" are not counted.