If I had column A and column B:

A B
red green
green red
red green
blue pink
pink blue
blue pink
blue pink
black white
black white
white black

Let's say I have hundreds of rows of combinations. What I need to do is on a second sheet, show all the different combinations and the number of times each occurs. So for the above, the result would be:

Combination: Number of times:
red green 3 (whether it is green first or red first doesn't matter and likewise for the others)
blue pink 4
black white 3

So, I would need it to give me the combination and the number of times it occurs. Any idea how I could do this? Ideally using pivot tables...