input: Write a function to count the number of occurrences of an element in a list.
  assert countOccurrences([1, 2, 3, 2, 3, 2, 4], 2) == 3
  assert countOccurrences([1, 1, 1, 1, 1], 1) == 5
  assert countOccurrences([1, 2, 3, 4, 5], 6) == 0
output: def countOccurrences(lst, x):
      return lst.count(x)