Issue with terminating loop without dropping images

Hello! I am very new to psycopy and python in general and would greatly appreciate any input! I’m attempting to have 2 sequential images be presented back to back followed by an n-back task. Each trial, images switch from positive to negative, ie 2 images of the same kind are presented each trial. There are 4 trials with the outer loop ‘sequential’ and nReps of 4. I have tried having all of the 66 images on one condition file where they are alternating positive and negative by 2’s. Additionally I have a code component on the images (exptrialspics.finished is the name of the inner loop around the images):
begin experiment: myCount = 0
begin routine:
myCount = myCount +2
if myCount > 3:
exptrialspics.finished = True

What is happening is when I run this, the first rep 2 positve images come up (which is correct) followed by the n-back the next 3 reps, 1 positive image comes up. In other words it doesn’t appear to be traveling down the condition file.

I have also tried having 2 separate pieces:
Positive images+nback and negastive images+nback with a loop around this with nRep=2 and seperate condition files for depending on the type of image (+ or -). This alternates well with the same code component (though labeled differently: not myCount but NegPics and PosPics) but similarly seems to drop images each time around, so the first presents 3 images and next 2 images and so on. Additionally, the images presented are only the ones at the beginning of the condition files.

I’m not sure if the separate pieces is a better approach? If so what might be the cause of the images dropping off?

I apologize for the long-winded explanation and hope this makes sense and once again would appreciate any help!