count the characters number in a string