input: def count_pairs(numbers: List[int], x: int) -> int:
      """Given a list of numbers and a target sum x, count the number of pairs 
      whose sum is equal to x.
      >>> count_pairs([1, 9, 5, 0, 20, -4, 12, 16, 7], 10)
      3
      >>> count_pairs([1, 2, 3, 4, 5, 6], 10)
      2
      """
      count = 0
      i, j = 0, len(numbers) - 1
      while i < j: 
          sum = numbers[i] + numbers[j]
          if sum == x: 
              count += 1
              i += 1
          elif sum < x: 
              i += 1 
          else: 
              j -= 1
      return count
output:     count = 0
      seen = set()
      for num in numbers:
          complement = x - num
          if complement in seen:
              count += 1
          seen.add(num)
      return count