input: Write a python function to count the occurrences of each element in a 2D list.
  assert count_occurrences([['a', 'a', 'b', 'c', 'c'], ['c', 'b', 'a', 'a', 'b']]) == {'a': 4, 'b': 3, 'c': 3}
  assert count_occurrences([['x', 'y', 'x', 'z'], ['y', 'x', 'x', 'y']]) == {'x': 4, 'y': 3, 'z': 1}
  assert count_occurrences([['apple', 'banana'], ['apple', 'orange', 'banana', 'apple']]) == {'apple': 3, 'banana': 2, 'orange': 1}
output: def count_occurrences(lst):
      from collections import Counter
      flat_list = [item for sublist in lst for item in sublist]
      return dict(Counter(flat_list))