I guess you could insert a code component in the first routine that sets a counter at the beginning of the experiment (something like myTrials1 = 0 in the Begin Experiment tab) and then each time it runs it goes up, plus a conditional that stops the loop at 4 repeats so that it only runs 5 times looking something like this:
myTrials1 = myTrials1 + 1
if myTrials1 > 4
trials.finished = True
Thats assuming the inner loop is called trials, of course.
Then, you can insert another code component in the second routine that resets myTrials and starts a different counter so that everything is repeated the number of times you want.
That is, assuming you are using two different routine that only differ in that stimulus. You could instead create a single routine with both stimuli and have the second one only be shown each 6 trials, but i think you wouls have to tamper with a little coding