I think you don't need the length of string you want to calculate the digit in the length of string.
you can use this code :-
your_string = 'qwertyuiop'
print len(str(len(your_string)))
Output:
2
you can use this code :-
your_string = 'qwertyuiop'
print len(str(len(your_string)))
Output:
2