input: Write a function to count the number of occurrences of an element `x` in a list `y`. The function should return the count of `x` in `y`.
  
  def count_x(y, x):
      count = 0
      for i in y:
          if i == x:
              count += 1
      return count
  
  assert count_x([3, 5, 2, 7, 4, 3, 2], 2)==2
  assert count_x([3, 5, 2, 7, 4, 3, 2], 3)==2
  assert count_x([3, 5, 2, 7, 4, 3, 2], 7)==1
  assert count_x([], 2)==0
output: def count_x(y, x):
      count = 0
      for i in y:
          if i == x:
              count += 1
      return count