Well basically you're just trying to find how many combinations you can make when you draw 2 things from a bag of 6 things.
So you would just do 6*5 = 30. But this double-counts by a factor of 2, so you would divide by 2 to yield 15. It double-counts because cord A-B is the same as cord B-A.