I believe its every rally phase the attacker has the choice of self rallying their leaders, AND one unit, while the defender can only self rally one unit. Don't quote me on this, I'm new to the game and am just learning the rules too.
The attacker can rally all broken leaders and ONE broken MMC, then all other broken MMC if there is an unbroken leader present. The defender can do the same, except he may not rally an MMC without a leader. Also, you may never attempt to rally a unit twice, even if you have 2 leaders or if the MMC self-rally fails.