added javascript char counter