Completed number-of-divisors function.