Added code to count number of digits in the url too