Define an array of type int, count the number of occurrences of array elements