input: Write a function to find the number of occurrences of an element x in a list y. If the list or element is not provided, return -1.
  
  assert count_occurrences(2, [3, 5, 2, 7, 4, 3, 2])==2
  assert count_occurrences(3, [3, 5, 2, 7, 4, 3, 2])==2
  assert count_occurrences(7, [3, 5, 2, 7, 4, 3, 2])==1
  assert count_occurrences(10, [3, 5, 2, 7, 4, 3, 2])==0
  assert count_occurrences(2, [])==0
  assert count_occurrences(None, [3, 5, 2, 7, 4, 3, 2])==-1
output: def count_occurrences(x, y):
      if x is None or y is None:
          return -1
      return y.count(x)