obs1 VAR1=A VAR2=1 obs2 VAR1=A VAR2=1 obs3 VAR1=B VAR2=2 obs4 VAR1=B VAR2=2 obs5 VAR1=B VAR2=2 obs6 VAR1=C VAR2=1 obs7 VAR1=C VAR2=1 obs8 VAR1=C VAR2=2 obs9 VAR1=D VAR2=1 The output would simply be a count of "3" Count 1 - obs1 and obs2 match on VAR1 as both have a value of A and also match on VAR2 with value of 1 Count 2 - obs3, obs4, obs5 match on VAR1=B, match on VAR2=2 Count 3 - obs6 and obs7 match on VAR1=C, VAR2=1 I don't care about obs8 since it didn't match VAR2 with obs6 I don't care about obs9 since it doens't match VAR1 with any
... View more