It needs to be in its own directory with permissions set to 777 as it writes its log files to there. Install it in a directory called counter, and use the code from the first post, it will work then.
Put the directory in your site root: yourdomain.com/counter