Hello, I have try many times to understand how the quadrature encoder work so I can count a speed or steps of dc motor.

can any one Explain how can I use these encoder for count speed ??

To just measure the speed of a motor one doesn't need to use both A and B signals of a quadrature encoder. Just reading one of the 2 channels and knowing the number of pulses per revolution (from datsheet) one can just measure the counts generated within a specific 'gate' time, in effect you just measure the frequency of just one of the signal inputs to determine motor speed.

Ok, so you say that if I need to mesure the speed I need to connect one pin. hmmm so since I use the pololu wheel Encoders I don't have the datasheet but all I need is how to use these encoders as speed sensors for my robot (thay will show in a LCD) ?

Just time the interval between successive rising or falling edges of the signal.Take the reciprocal of the time to get the frequency. Divide the result by the number of pulses per revolution to get the final speed.