counting in a string