Count Max Frequency

Find the sum of frequencies of all elements that attain the maximum frequency in an array. Compute frequencies, find the max frequency value, then sum frequencies equal to that max.

Examples
Input: [1,2,2,3,1,4]
Output: 4
Hints

Count Max Frequency

Find the sum of frequencies of all elements that attain the maximum frequency in an array. Compute frequencies, find the max frequency value, then sum frequencies equal to that max.