Added character counting