  We prove an integral formula for continuous paths of rectangles inscribed in
a piecewise smooth loop. We then use this integral formula to show that (with a
very mild genericity hypothesis) the number of rectangle coincidences,
informally described as the number of inscribed rectangles minus the number of
isometry classes of inscribed rectangles, grows linearly with the number of
positively oriented extremal chords -- a.k.a. diameters -- of the polygon
