Answer: 10
Imagine you have 2 slots or boxes that are empty. They represent the possible choices for the letter you pick. For example, you can place B in slot 1 and D in slot 2. There are 5 choices for slot 1 (A,B,C,D,E) and four choices for slot 2. Why 4? Because after we pick the letter for slot 1, we have one less letter to pick from. We can't reuse that letter.
Now multiply those values 5 and 4 to get 20. There are 20 different ways to pick a pair of letters from a pool of 5 total. However, order does NOT matter because the segment AB is the same as BA. Since order doesn't matter, we are doubly counting when we shouldn't. In other words, our count is two times higher than it should be. Instead of 20 pairs, it's actually 20/2 = 10 pairs. That's why the answer is 10.
The list of 10 segments are: {AB,AC,AD,AE,BC,BD,BE,CD,CE,DE}
Side note: you can use the nCr combination formula with n = 5 and r = 2 to get the same answer.