Eu tenho este script, veja se te ajuda: <script language="JavaScript">
function textCounter(campo, countcampo, maxlimit){
if (campo.value.length > maxlimit) {
campo.value = campo.value.substring(0, maxlimit);
}
else
{
countcampo.value = maxlimit - campo.value.length;
}
}
</script>
<form name="form">
<textarea rows= "2" cols= "20" name="campo" onkeyup="textCounter(this.form.campo,this.form.charRestantes,255);" onkeydown="textCounter(this.form.campo,this.form.charRestantes,255);"></textarea><br> <input type="text" name="charRestantes" value="255" size="3" maxlength="3"> caractere(s) restante(s)