Use this formula in H4

=SUMPRODUCT(($A$3:$A$20=$G4)*($B$3:$B$20=H$3)*(($C$3:$C$20=$F$3)+($C$3:$C$20=$F$4)+($C$3:$C$20=$F$5)))