input: Write a function to count occurrences of a given element in an array.
  assert count_occurrences([1, 2, 3, 2, 2, 4, 5], 2) == 3
  assert count_occurrences(['apple', 'banana', 'apple', 'cherry'], 'apple') == 2
  assert count_occurrences([1, 1, 1, 1, 1], 1) == 5
output: def count_occurrences(arr, element):
      return arr.count(element)