Joseph is in the middle of packing for a vacation. He's having a bit of trouble finding all of his socks, though.
Write a function that returns the number of sock pairs he has. A sock pair consists of two of the same letter, such as "AA". The socks are represented as an unordered sequence.
sock_pairs("AA") ➞ 1
sock_pairs("ABABC") ➞ 2
sock_pairs("CABBACCC") ➞ 4
0.CC for the last example.