get frequencies of each number in a freqency array