count number of characters in text python