Typescript Count Unique Values Python Interview Bit