Consistent counting and handling

I implemented a simple callback, that does not allow anyone to type after the limit has been reached, regardless of browser treatment for maxlength.