Support capping the number of repeats.