The number of times the image of the octagon will coincide with the preimage during rotation is determined by:
N = R/C
where
N is the number of times the preimage coincided with the rotated image during rotation
R is the angle of rotation
C is the central angle of the regular polygon
For an octagon, the central angle is
C = 360/8 = 45
So,
N = 360 / 45 = 8
Therefore, the rotated image of the octagon will coincide with the preimage 8 times during rotation.