How to get Odometery (ticks) from an Arduino Robot

Thank you for the reply and pointers.
Regarding finding the real speed, yes, I though about something similar, in a slightly different way, that is fixing a timer in the robot to run for a specific time and them we measure the run distance.
I had also the idea of trying different speed and grounds.

Thanks anyway for the pointers
A