code counter into js file