What is the purpose of the 8 tooth timing gear?
When looking at Blakbird's Technicopedia page for this Technic set, this part is indeed used as a rotary encoder in combination with the bar code scanner.
See the last entry on the page.