Hi -- in the interest of helping you help yourself I would suggest you break up the problem into subproblems.
Read in this month's file and use the split function to find the first word on each line, then update a hash, using that first word as the key.
Determine the name of the file for each of the previous three months (sort of tricky -- think about in February 2003 -- you need to get 200211, 200212, and 200301).
For each of those files:
create a new hash, let's call it the "counter" hash
read in each record and split to find the first word.
if the word is in the "this month" hash, increment your counter hash.
when you're done reading a given file, print out the counter hash.
Each of these subproblems is pretty simple on its own, so start there and report back if you're struggling.