input: Write a function to calculate the number of unique elements in a given integer array. The function should return the count of unique elements.
  
  def num_unique_elements(arr):
      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([1, 2, 3, 4, 5])==5
  assert num_unique_elements([])==0
  assert num_unique_elements([1, 1, 1, 1])==1
  assert num_unique_elements([7, 9, 7, 9, 9])==2
output: def num_unique_elements(arr):
      unique_arr = set(arr)
      return len(unique_arr)