This post explains, how to create a Character Counter.