Is this the full XPath? Can you check the Edit XPath box in the formula editor?
At any rate, I'd think you want to count the rows where the values are true - without knowing the XPath to your nodes, I have to make something up here, but I'd expect something like:
count(groups/group[dataMSM = 'yes' and dataTested = 'yes'])
So, in the formula editor, select the repeating group. Add a filter, and the filter would be that dataMSM is yes and dataTested is yes - does that make sense?