Thanks, I think this is a work around that could work.
(I just remembered my question about calculations among repeats from some time ago and found that it was implemented! Very nice! Thanks a lot.)
Now, if I would use the count() function within the repeat, how would I get the result of the last repeat to compare it with my desired repeat_count? Is there a way to pick the answer from a certain (in this case the last) repeat?
EDIT: I figured it out. (I thought I would need a counter within the repeat but count(answer) does the job.) An open question would still be if there is a way to get the answer of a certain repeat, e.g. if I want the sequence of used means of transport and the last repeat must always be "by foot". Something like ${means_of_transport}[count(${means_of_transport}-1]?