We study a one-dimensional Coulomb system, where two charged colloids are neutralized by a collection of point counterions, with global neutrality. With temperature being given, two situations are addressed: Either the colloids are kept at fixed positions (canonical ensemble) or the force acting on the colloids is fixed (isobaric-isothermal ensemble). The corresponding partition functions are worked out exactly, in view of determining which arrangement of counterions is optimal. How many counterions should be in the confined segment between the colloids? For the remaining ions outside, is there a left-right symmetry breakdown? We evidence a cascade of transitions as system size is varied in the canonical treatment or as pressure is increased in the isobaric formulation.