js for page count