CrossRoads: It's this one http://www.digikey.com/product-detail/en/PEC12R-2125F-N0012/PEC12R-2125F-N0012-ND/4499641 with the filter circuit on page 2 of its drawing http://www.bourns.com/data/global/pdfs/PEC12R.pdf
OK, that's a simple mechanical rotary encoder which creates less (when new) or more (when old and worn out) bouncing while rotating.
All code linked in the playground that uses hardware or pinchange interrupts will lead to less or more crappy results.
The filter circuit will make things better, because that helps preventing bouncing and less bouncing helps crappy code in working better with such encoders.
I'd strongly suggest either polling such encoders or use timer interrupts.
Polling of rotary encoders would be suitable, if the loop function is always running at a high speed with no blocking times and no slow operations, let's say the loop function never takes more than one or two milliseconds to complete. In that case: Just poll the inputs of the rotary encoder and count accordingly to the state up and down.
The other possibility would be the usage of timer interrupts. Set up a timer that generates let's say 500 or 1000 interrupts per second. Then in the interrupt handling read the inputs and count accordingly to the state up and down.
How many of such encoders would you like to use in the application? Just one? More than one (how many total)? Would polling be applicable to your application (loop functions always faster than 2ms)? Or do you have a timer left that could be used for the rotary encoder(s)?