Write a Python function that takes a list of integers and returns the number of duplicate values in it.
You should count each duplicated value only once, regardless of how many times it appears.
1 2 3 4 2 3 5 6 1
Duplicates are: 1
, 2
, 3
→ count is 3
nums = list(map(int, input().split()))
print(len([x for x in set(nums) if nums.count(x) > 1]))
Input: 1 2 3 2 4 5 3 1
Output: 3