Why sir define count as mid-i+1?

why sir define count as mid-i+1?
why not mid+1;

hello @gupta.ritik2002
if a[i] > a[j] this condition satisfies .

then all elments from index i to mid will satisfy this condition because array is sorted .
total count of such elements will be mid-i + 1 therefore we are adding only mid-i+1 in our array and not mid+1

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.