How to make two motors have really equal speed?

My car is used for indoors mapping,like this http://www.robotc.net/blog/2011/08/08/robotc-advanced-training/

it counts a step by a grid, and arduino uno has only 2 external interrupt pins,so each pin can only connect one encoder to receive waveforms,its hard to tell which wheel is slower or faster that another one, right?

But it can count two wheels for same waveform times,I guess ,to let them go equal distance even one of them reach the setting value already but another one not until it reach the setting value ,too. and it goes to next step.