Given an array of integers, fill a the result array with the elements that occur most frequently.
Return the size of the array. For instance, in the array [2,2,2,1,3,3,3]
both 2 and 3 appear three times. The result array
should contain [2,3] and the function should return 2.