count all subarrays with given sum