parentheses are missing

use

=(COUNTIF(X7:X65536,"NO MATCH"))-(SUMPRODUCT((A7:A65536>0)*(R7:R65536="")))