There's a strong motive to defect from cooperation, unfortunately. If 100 nations are discussing banding together to defend themselves, and everyone realizes it will only take 50 nations to repel an attack, then there is going to be a very strong incentive to be a free riding country.