Number of subarrays of length in [A,B] divisible by K