Allow setting number of repeats.