I find it surprising that nobody slapped your wrist about this yet... but the way you implemented your hit counter, is a recipe for disaster. If you expect there's even the tiniest slight chance that more than one browser might be retrieving the same page at the same time, then you need to use file locking.
Still, it's not trivial to do it right, but you can do worse than looking in the official perlfaq: I still don't get locking. I just want to increment the number in the file. How can I do this?. Try not to mind the bigotry in the text.