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