Starting from a pandas DataFrame (df) as below:

```
Name AttributeList
A      1;2
B      2;3;1
C      4;7
D      8;7;3

```

I want to create a new df for each possible pair of Names, by counting how many attributes they share and skip the case where they share none of the attributes. Following is the expected output:

```
Name1 Name2 NumberAttributesShared
A       B      2
B       D      1
C       D      1

```

Pairs should not be repeated, so if I have A B, then I should not have B A.
In this example, the pair A C is not listed, as A and C do not share any attribute. The pair A B, on the other hand, has value 2 as they share two attributes.

Any clever and efficient way to reach this goal?