There are a wealth of possibilities here.
Could you elaborate a little on what you are trying to do?
Do you want to track downloads of a file, or page views, or something else?
Is this counter just for you or should your visitors see it?
Is it just out of curiosity or are you trying to obtain some serious metrics about your site?
What technologies do you have at your disposal (PHP for example)?