Add method for computing number of divisors.