Checking whether the max and min values occur equally frequently
Reviews:


Nomenclature "a" : Name doesn't reflect the motive.
">2" is incorrect. It should be ">1".
{1, 1, 1, 1, 1, 1} will be incorrect in your case as min and max are same.
a could be null so we should check 

if(input == null || input.size &lt;2){
    return 0;
}

Multiple returns, though debatable but advisable.
Coming to reducing the loops:

for (int num : a) {
    if (num &gt; max) {
        max = num;
        maxCount = 1;
    } else if (num == max) {
        maxCount ++;
    }

    if (num &lt; min) {
        min = num;
        minCount = 1;
    } else if (num == min) {
        minCount ++;
    }
}

If you wish to minimize further: return (max != min &amp;&amp; maxCount == minCount)