At or near the top of the document, you can insert a request for the user to provide a 'repeat' value for a designated groupname in this fashion.
<<*AskRepeat*!groupname!*>>. It is simply the 'repeat' keyword and the !groupname!. Nothing else. The entire prompt is 'administrative' which is why it closes with a '*'. Its sole purpose is to ask how many repeats of each !groupname! there are to be. The value is recorded, but nothing is returned to the screen.
You can augment the block with a question or prompt. E.g.:
<<*AskRepeat*!numchildren!How many children were born of this marriage?*>>"
Since the entire prompt is 'administrative', the entire prompt must close with a '*'.