Area effect attack is the typical counter to swarming/concentration of units in a small area. Usually a manually selected ability or splash damage effect.
Long-range sniping. Units with long range attacks.
Spells/Ability with long range.
Defensive fortification with equal or greater range.
Swarming the attacking unit with spread-out columns of units from multiple direction.

If the games doesn't have a counter(e.g. ultra-long-range area-of-effect) the players will concentrate on creating these unit regardless of cost.
Area-of-effect and long-range create a high-power multiplier(nuke ability) that skews balance towards economic(if high-cost) or preventive rush tactics.