C++ Learning how many numbers are repeated in an array

I'm learning C++. Something in my code isn't working but I don't understand what is the problem. I think is the incrementation of the stat array that counts how many numbers are repeated in T array... How can I fix it? Maybe is the syntax stat[elt]++ that is not correct?

int anneeSecu(int T[12][13], int j){
// here I join the 2 numbers of tab (they refer to the year of birth) and I add the number 20, because I know that they were born all after 2000
int a = T[j][1];
int b = T[j][2];