dc motors encoders

I have a dc motor encoder 12v 600rpm and I want to connect directly this motor with Arduino Mega in order to recover the value of encoders when the wheel turns one time...

am beginners on Arduino
thanks in advance

Not enough information. Do you have a data sheet for the encoder? Do you have a data sheet for the motor? Do you have a data sheet for the motor driver?

I want to connect directly this motor with Arduino Mega

You will need a suitable motor driver. Pololu has a great selection, but first you need to determine the startup/stall current of the motor, and select a driver that can handle that comfortably.