The S8 to Hanau crosses the Main three times (until Offenbach Ost only twice), the S9 four times:
The S8 to Hanau route intersects the Main River three times (with the exception of Offenbach Ost, which has only two intersections), and the S9 route intersects it four times: