input: 
  def num_unique_elements(arr: List[int]) -> int:
      """
      Counts the number of unique elements in the given list of integers.
      
      >>> num_unique_elements([1, 2, 3, 2, 1, 4, 7, 8, 9, 8])
      7
      >>> num_unique_elements([5, 5, 5, 5, 5])
      1
      >>> num_unique_elements([])
      0
      """
      return len(set(arr))
  
output:     unique_elements = set()
      for num in arr:
          unique_elements.add(num)
      return len(unique_elements)