I need to be able to compute newvar=1 if any two/at least two conditions in a list are met. Basically, how do I modify an OR statement to make it so the variable is computed only if at least 2 of the criteria are met.

This is what I have thus far:

IF((p_ri4 >1 OR (p_ri20 >2 OR p_ri26 >1) OR p_ri1 >2 OR p_ri24 >2 OR p_ri8 >2 OR p_ri21 >2)) p_ridx =1