Count Distinct Element Leetcode Python Easy