Pergunta de entrevista da empresa United Launch Alliance

Describe a method for counting the occurrence of each element in an array. Was not required to write code but just describe a solution.