input: def count_pairs(numbers: List[int], x: int) -> int:
      """ Given a list of integers 'numbers' and an integer 'x', this function counts the
      number of pairs in the list that add up to 'x'.
      >>> count_pairs([1, 9, 4, 6, 5, 3, 7], 10)
      2
      >>> count_pairs([1, 3, 2, 2], 4)
      2
      """
output:     count = 0
      seen = set()
      for num in numbers:
          complement = x - num
          if complement in seen:
              count += 1
          seen.add(num)
      return count