Hooking up incremental encoder to mbed
Does anyone have a schematic I can follow on how to hook it up
  correctly?


According to:

http://henrysbench.capnfatz.com/henrys-bench/arduino-sensors-and-input/keyes-ky-040-arduino-rotary-encoder-user-manual/


"+" is supply Voltage 
"CLK" is Encoder Output A (with an included pullup R of 10k to "+" on the pcb) 
"DT" is Encoder Output B (with an included pullup R of 10k to "+" on the pcb)
"GND" connects to both Encoder Output Common, and one leg of the
push-button switch. 
"SW" is the other leg of the push-button switch.


This next image is from the same website:

http://henrysbench.capnfatz.com/henrys-bench/arduino-sensors-and-input/keyes-ky-040-arduino-rotary-encoder-user-manual/

The encoder is a typical quadrature style encoder with a an additional push-button in the knob stem.

So:


Connect 5V (or your existing system voltage) to the "+" input.
Connect your system ground to the "Gnd" terminal.
Connect the "CLK" terminal to one digital input.
Connect the "DT" terminal to the other digital input.


Confirm its all working with a voltmeter, then start writing code.

CLK and DT wavforms (image from the same web site noted above).

On the plot:


C = Ground
A = CLK
B = DT
"Open" = 5V output (measured with voltmeter).
"Closed" = 0V output (measured with voltmeter).




http://henrysbench.capnfatz.com/henrys-bench/arduino-sensors-and-input/keyes-ky-040-arduino-rotary-encoder-user-manual/

The dotted lines show where the switch detents should be (however, I can't confirm this without having the actual encoder in hand).  What this means is that when you turn the encoder, and it 'clicks', the encoder is designed to stop between clicks at these locations.  Sometimes one 'click' is many counts.  This depends on the encoder's mechanical design (how the detents mechanically line up with the output electrical changes), and the decoding algorithm.  If you get more than 1 count per click, then divide the output in software.

Some notes:


The labeling of the PCB seems silly.
There are things that you'll learn about interfacing mechanical switches to micro-controllers that may surprise you.  Research this.  Check compatibility with the "QEI" module you use - as I am not familiar with it.
For troubleshooting, I'd recommend that you define in your code these variables: CurrentCount, PreviousCount, DividedCount (%), Direction (CurrentCount - PreviousCount).