added js character counter