input: Write a function to count the number of unique elements in an integer array. The function should take an integer array as input and return the number of unique elements. If the array is empty, it should return 0.
  def num_unique_elements(arr):
      if len(arr) == 0:
          return 0
      unique_arr = set(arr)
      return len(unique_arr)
  assert num_unique_elements([1, 2, 3, 2, 1, 4, 7, 8, 9, 8])==7
  assert num_unique_elements([])==0
output: def num_unique_elements(arr):
      if len(arr) == 0:
          return 0
      unique_arr = set(arr)
      return len(unique_arr)