Pergunta de entrevista da empresa Salesforce

Given an array with repeated values. Find out the length of an array with all the values from the given array only used once.