AppleOne interview question

Count subarrays with sum equals k