You can place a script in the Custom Keystroke Script option in the field that will receive the text. Supposing your count field is set to be multiline and is named as counter you can use a script like this in it:
if (event.willCommit == false) {
var ec = event.change;
var nv = event.value + ec;
var nc = nv.length;
var msg = nc + " characters typed.\n";
msg += (3000 - nc) + " remaining.";
this.getField("counter").value = msg;
}
