You can try simple approach without importing anything like this:
my_list = [(1,12),(12,1),(12,1),(20,15),(7,8),(15,20)]
count={}
for i in my_list:
if tuple(sorted(i)) not in count:
count[tuple(sorted(i))]=1
else:
count[tuple(sorted(i))]+=1
print(count)
output:
{(15, 20): 2, (7, 8): 1, (1, 12): 3}