rotary switch / turn knob? how to call it?
(Incremental) Rotary encoder switch, aka "quadrature encoder". It has two outputs that are 90 degrees out of phase. Due to the phase difference you can figure out both direction and number of steps. Same principle is used in a mechanical computer mouse. 

Rotary encoder on Wikipedia