Divisible subarray

I am unable to understand this problem. I have watched the tutorial video. But how is this working in the end after we compute the count of sub array with count[sum%n]++;

Kindly help me out.