The allies brackets are 1-4, 5-9, 10-14 (not sure what they are above this). So best to have 4, 9 or 14 allies.
This is correct, but it is 6 units per ally both for attacking and defending (defensive buildings are in addition to this), so for me, only the best 24 units will be used in battle...