count number of characters in line python