input: Write a function to count the number of pairs of elements in a list that sum to a given value x. If the list is empty, return 0.
  assert count_pairs([1, 9, 4, 6, 4, 5], 10)==3
  assert count_pairs([1, 1, 1, 1], 2)==3
  assert count_pairs([10], 10)==0
  assert count_pairs([], 10)==0
output: def count_pairs(lst, x):
      count = 0
      seen = set()
      for num in lst:
          if x - num in seen:
              count += 1
          seen.add(num)
      return count