count characters in text