First of all, we need to see the data that should match more than once. For exampleThis is my abcdef page. That contains many instances of abcdef. So far I can count 2 instances of abcdef... oops that makes 3.
Without knowing what the page looks like and how many hits it should get, it's hard to gauge whether your output of 1 is incorrect. Also, checking the contents of the scalar you are pushing could lead to some interesting discoveries. This may not be your exact code, but if you haven't checked its contents, I would highly reccomend it.
Also, using scalar to pring out the size of the array may be unneccesary in your perl version. In 5.8, I don't know how far this dates back, you can print the size of the array by simply issuing print @files;