hi, if we have two natural numbers say a and b then how can one find the number of numbers between them which have exactly k number of divisors?

Here k is an odd number.

I know that we need to find the perfect squares between these limits but how to get those who have exactly k divisors?

E.g

if a =2 , b =49 and k = 3 then the ans = 3