Optiflow based Odometry speed sensing
The Avago Tech ADNS-5020-E can be configured for either 500 or 1000 Counts per Inch, thus reporting back to the controlling electronics once every 1/500 or 1/1000 inch of movement. 

Thus, determining speed of movement requires adding up the delta values in the report packets received by the Arduino every set period, say every millisecond, and thus arriving at the appropriate number of 500ths or 1000ths  of inch per millisecond.