Why don't you use an arrayformula in O33 ?
PHP Code:
={SUM(COUNTIF(N10:P31;$A$2:$F$2))}