input: from typing import List, Any
  
  def count_x(y: List[Any], x: Any) -> int:
      """Counts the number of occurrences of an element x in a list y.
      
      >>> count_x([3, 5, 2, 7, 4, 3, 2], 2)
      2
      >>> count_x([], 5)
      0
      >>> count_x([1, 1, 1], 1)
      3
      """
output:     count = 0
      for element in y:
          if element == x:
              count += 1
      return count