input: from typing import List
  
  def count_pairs(numbers: List[int], x: int) -> int:
      """Returns the number of pairs in the list that sum up to x.
      
      >>> count_pairs([1, 9, 5, 0, 20, -4, 12, 16, 7], 10)
      3
      >>> count_pairs([1, 2, 3, 4, 5, 6], 5)
      2
      """
output:     count = 0
      seen = set()
      for num in numbers:
          complement = x - num
          if complement in seen:
              count += 1
          seen.add(num)
      return count