I think the limit is 16, but the limit you'll most likely run into is what the airline can auto-price.
UA can auto-price 8 segments, not including ARNK segments. CO can auto-price 12.
Anything more than that will require manual pricing by a human, which can be time consuming and expose you to errors if they don't do it right.