adds js to count chars