Number of numbers between a and b having exactly n prime factors