Write a simple function to return the number of unique elements in an array.
Implement def count_unique(nums):, where nums is an array of integers. Return an integer representing how many distinct values appear in the array. Duplicate occurrences of the same value count once, and an empty array should return 0.
def count_unique(nums):