Please consider the following formula:

=SUMPRODUCT((--(A1:A9="X")),(--(B1:B9=3)),(--(C1:C9=5)))

It works as expected, and the formula in C1 is (copied into C2 to C9, as well):

=COUNTIF(D1:H1,"Y")

Is it possible to incorporate that COUNTIF formula into the SUMPRODUCT formula so I can eliminate helper column C? If so, how? Thanks!