# PUT YOUR CODE FOR incrementCount here

# count the number of times each word occurs in a file
%words = ();
# read a line at a time from stdin
while ($line = <STDIN>) {
    chomp($line);  # discard the newline character
    @fields = split / +/, $line;   # split the line into fields
    foreach $word (@fields) {
	incrementCount($word, \%words);  
    }
}
foreach $key (keys(%words)) {
    printf("%s: %d\n", $key, $words{$key});
}
