Sean is correct. There is some type of counter mounted on the front tire/axle, to measure time/distance. I read about all the Matty Box stuff years ago, I don't remember all of it, how it worked, etc.
To my knowledge, other than Matty, who was protested, refused to tear down, and was tossed, at the 1999 Moroso 5 Day, none of the others were found to be illegal at any time. Not sure if they were ever protested (or found illegal). I apologize if I am incorrect.
*edit* I did find this.
http://racingarticles.com/article_racing-11.html