input: from typing import List
  
  def count_occurrences(lst: List[int], x: int) -> int:
      """
      Count the number of occurrences of element x in the list lst.
  
      >>> count_occurrences([3, 5, 2, 7, 4, 3, 2], 2)
      2
      >>> count_occurrences([1, 2, 3, 4, 5], 6)
      0
      """
output:     count = 0
      for num in lst:
          if num == x:
              count += 1
      return count