// Gets character limit and allows no more
$(function() {
  // Creates the character count elements
  $(".js-char-count").wrap("<div class='char-count'></div>")
  $(".js-char-count").after("<div class='char-text'>Character count: <span class='current-count'>0</span></div>");

  // Includes charact limit if there is one
  $(".js-char-count").each(function(){
    var maxlength = $(this).attr('maxlength');
    if (maxlength) {
      $(this).closest(".char-count").find(".char-text").append("/<span class='total-count'>" +maxlength+ "</span>")
    }
  });

  // On keydown, gets character count
  $(".js-char-count").on('keyup', function () {
    content = $(this).val().replace(/(\r\n|\n|\r)/gm,"  ");
    $(this).closest(".char-count").find(".char-text .current-count").text(content.length);

    // If character count is over the limit then show error
    if (content.length > $(this).attr('maxlength')) {
      $(this).closest(".char-count").addClass("char-over");
    } else {
      $(this).closest(".char-count").removeClass("char-over");
    }
  });
});

@@ -632,24 +632,289 @@
 nction () %7B%0A
+    // Webkit counts a new line as a two characters%0A    // IE doesn't use maxlength%0A    var newline = %22  %22;%0A%0A    if (navigator.userAgent.toLowerCase().indexOf('firefox') %3E -1) %7B%0A      // Firefox counts a new line as a singular character%0A      newline = %22 %22;%0A    %7D%0A%0A
     content 

Fix char count for Firefox