input: from typing import List
  
  def count_pairs(numbers: List[int], x: int) -> int:
      """Counts the number of pairs in a sorted list of numbers that sum up to a given value x.
      >>> count_pairs([1, 2, 3, 4, 5, 6], 10)
      2
      >>> count_pairs([1, 2, 3, 4, 5, 6], 8)
      2
      >>> count_pairs([1, 2, 3, 4, 5, 6], 11)
      1
      """
      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
      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