I have found a way to do the counter. Thanks. Here is the sample code.
<html>
<head>
</head>
<body>
<script type="text/javascript">
var c=0;
var file = "\\my-path.txt"
function addToFile() {
var fs = new ActiveXObject("Scripting.FileSystemObject")
var ts = fs.OpenTextFile(file,8,true,-2)
/*
var...