This solution will respond to keyboard and mouse events, and apply to initial text.
$(document).ready(function () {_x000D_
$('textarea').bind('input propertychange', function () {_x000D_
atualizaTextoContador($(this));_x000D_
});_x000D_
_x000D_
$('textarea').each(function () {_x000D_
atualizaTextoContador($(this));_x000D_
});_x000D_
});_x000D_
_x000D_
function atualizaTextoContador(textarea) {_x000D_
var spanContador = textarea.next('span.contador');_x000D_
var maxlength = textarea.attr('maxlength');_x000D_
if (!spanContador || !maxlength)_x000D_
return;_x000D_
var numCaracteres = textarea.val().length;_x000D_
spanContador.html(numCaracteres + ' / ' + maxlength);_x000D_
}
_x000D_
span.contador {_x000D_
display: block;_x000D_
margin-top: -20px;_x000D_
}
_x000D_
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>_x000D_
<textarea maxlength="100" rows="4">initial text</textarea>_x000D_
<span class="contador"></span>
_x000D_