Holy moly that datasheet is abysmal! My eyes actually hurt from looking at it.
For reference, the dimensional drawing has a much clearer description of the pin layout, although it’s still laid out like a visual puzzle:
Viewed from the top down (which is what I hope “mounting side” means) the row of 5 pins are, left to right, 1, 2, 3, 4, 5, and the 3 bottom pins are A C B (… yeah)
It looks like the LEDs accept a common power supply on pin 5, and pins 4, 2, 1 when pulled to ground will light the Blue, Green and Red LEDs respectively.
Pin 3 is a normally-open switch (for the push-button action of the encoder) which closes and connects pin 3 to pin 5. So you’d need a weak pull-down resistor between pin 3 and ground to set a consistent input value that’s then overridden when it’s connected to pin 5. So the switch will be LOW normally, and HIGH when pushed.
And as @shoe points out, C is the common connection for the rotary encoder itself, and A and B are connected to the wipers which alternate HIGH/LOW in a waveform pattern corresponding to the speed/direction of the encoder.
When turned Clockwise terminal A will go HIGH (or whatever your common signal is) first, and terminal B will follow after (depending on turn speed) and when turned Counter-Clockwise terminal B will go HIGH first, and terminal A will follow.
If you’re using a Raspberry Pi it can be a little tricky to keep up with the encoder at high speed. On an Arduino you should probably use an interrupt on pin A or B and then monitor the state of the other pin.