Program rule, assign value by summing boolean data elements

Thank you!! I’ve tried this but it’s still blank.

I created a program variable for the data element itself (the yes I want to count - “stigmatise les personnes”). Then I created another calculated program variable (stigmatize persons calculated value).
I created one program rule of priority 1 with the expression
d2:hasValue(#{stigmatise les personnes}) &&#{stigmatise les personnes} ==1
and the action “Assign value 1 to #{stigmatize persons calculated value}”.

I did the same thing for another yes/no response. Then created another program rule with priority 2 - Add the yes responses, with the action to assign value, expression d2:hasValue(#{Stigmatize persons calculated}) and expression to evaluate and assign, adding up the calculated values.

I think this is a good idea and should work, but the data element I am trying to populate with the sum just remains blank. Let me know if you see any issues!

Gratefully~