Count number of chars in a string