How does one get counts for grouped data from ungrouped data. For example, how can I get X1 X2 Count 1 1 1 1 2 2 2 1 1 2 2 1 from X1 X2 A A A B B B A B B A Thanks in advance Paul Green