Altimetrik interview question

Count duplicates in a integer array