Optics of a Bygone Age: A 17th-century Invention for Counting Threads