in reply to Simple perl counter

Well, what have you tried? Counting the ids in the loop can be done with $ids{$person}++; and you can output the list with
foreach (keys %ids) { print "$_ $ids{$_} id\'s\n"; }
Which of these two were you having trouble with?