##
Freq.of occurrence freq_count
0 0
1 2
2 3
3 1
4 2
5 0
####
if(exists($count{$word})){
$occurence = $count{$word};
freq_count++;
}