counting pulses from encoder on interrupt 0 pin every 50 ms
Check the Baud Rate in Serial Monitor. If baud rate is not correct i.e. 9600 bps then it will show garbage.

Remove the Timer and Wire Libs

add this code in void setup()

attachInterrupt(0,void_counter,RISING);


the above is for the the external interrupt input. 

and attach your sensor/incoming pulse wire on Pin 2 on arduino.

make a new function like this

void_counter(){ 
pulses++;
}