How to count the number of occurences of distinct elements of a 2d array in C?
int main(){
    int counter = 0;
    int one = 0;
    int two = 0;
    int three = 0;
    int five = 0;
    int six = 0;
    char array[3][5] = {
        {'1', '3', '3', '5', '1'},
        {'2', '1', '5', '6', '2'},
        {'6', '2', '5', '5', '2'}
    };
    for(int j = 0; j < 3; j++){
        for(int i = 0; i < 5; i++){
            if(array[j][i] == array[j][i]){
                counter++;
            }
        }
    }
}
For every distinct number (represented here as a char) of the 2d array, I need to print their occurence count. For example like this:
number one is found 3 times in array
number two is found 4 times in array
...