You cannot dynamically change the settings for any layout object in Filemaker--that includes the number of repetitions.
There may be a better way to do what you want to do here.
Why do you want to change the repetition number settings like this?
I would prefer to place sub-records within a portal, but that is impossible
So have a repetition field within the portal almost provides that function..sort of. Having it dynamic is purely for show. Dynamic function could have resulted in displayed only the number of repetitions I require for each record.