Input: arr[] = {1, 4, 1, 2, 7, 1, 2, 5, 3, 6}
Output: 7
Explanation: Count of 1 = 3, 2 = 2, {3, 4, 5, 6, 7} all having count = 1
Mode = 1 and its count = 3,
If we remove 2, 3, 4, 5, 6, 7 then the mode does not change.
But if we remove any item of 1, then count of 1 = count of 2, as 2 > 1, so, the mode changes if we remove 1. So, Count = 7.
Input: arr[] = {1, 2, 2, 2, 1}
Output: 3
Explanation: Count of 1 = 2 and 2 = 3.
Mode = 2 and its count = 3,
If we remove 1, 1 then the mode does not change.
If we remove one count of 2 then also, mode does not change, as count of 1 = count of 2, but 2 > 1, so, there is no effect on mode. So, Count = 3.