For this behaviour, you could simply intercept the "change" event on the input, count the input.val().length, and show a label under the input.
Something like this:
$("#input").autocomplete().on("change", function() {
var charsLeft = 5 - $(this).val().length;
if (charsLeft > 0) {
$("#label").html(charsLeft + " more characters to go...")
} else {
$("#label").html("");
}
});