You may want to double-check the range in your constraint as you defined rest=2 and also multiply with 2.
Your current constraint basically requires in the sequence of 6 that max 4 are 1. It does not consider the order of the sequence.
As you stated, you have 2 constraints: