Hi,
I have a a dataset such as below

input str3(A B C) str3(X Y Z)
Yes No No Yes No No
No No No Yes Yes Yes
No Yes No Yes No No
Yes No Yes No Yes No
Yes Yes No No No No
Yes No No No Yes Yes
Yes No No No
No No No No No No No
No No No No No No No
Yes No Yes No Yes No
Yes No No No No Yes
end;

i would like to count the number of "Yes" out of (A B C) columns in to count_ABC columns, which should be contain value 1 for the ist case, for 2nd case the value should be 0. Similarly count_XYZ should be 1 for the ist case and 3 for the second case.

Please guide how to go about solve this handle this with handling missing datas?