What size threads on the shaft?
Why not just measure off a known distance on the threads and count the threads in that distance? Measure off 1/4 inch, count. If you count 7 threads, then you have 7 X 4 = 28 threads to the inch. If you count 6, you have 24.