Could not understand a statement

#include<bits/stdc++.h>
using namespace std;

int main(){
int k;
cin>>k;
string str;
cin>>str;
int ans=0;
int count[]={0,0};
int l=0;
for(int r=0;r<str.length();r++){
char a = str[r];
count[a - ‘a’]++;
if(min(count[0], count[1]) > k){
count[str[l] - ‘a’]–;
l++;
}
else
ans++;
}
cout<<ans;
return 0;
}

in this code what is the meaning of this statement—
count[a - ‘a’]++;

hi @shivamgoel150 all characters have an ascii value associated with them you can see the table here http://www.asciitable.com/
When we do char - ‘a’ we subtract the ascii value of ‘a’ from the ascii value of the character, and it gets converted to 0 based system where a-0, b-1, … z-25
we do so, so that we can store these values in an array easily (because index of array starts from 0)
We are storing frequency of alphabets in the “count” array