returns the number of printed characters