On the 4 pins, it doesn't matter which way the connector goes. It has redundant sensors in it, arranged so the hookup orientation doesn't matter. They are for the fuel injection computers.
The two pin is for the fans. There is a complete description of how it works and modifications to allow the fans to turn on earlier, here:
The mods work fine on the S600 also.
One pin is for the gauge.