I have a Python dictionary that lists the team members for couple of matches

```
match={'match1':[a,b,c,x,y,z],'match2':[a,y,z,k,m,o], 'match3':[c,x,a,k,l,m]}

```

I need to calculate the number of matches played by each team member along with every other team member. 

For example, a-c=2, a-o=1

What would be the best data structure to represent this data so that I can calculate the total matches for every team member combination easily?