Counting winding turns is made easy with this project that uses a hall effect device.
“Magnets on a spinning thing near a hall effect latching switch chip make pulses that a counter counts to count the turns the spinning thing spun.
Operation:
A latching hall effect switch turns ON when it sees one pole of a magnet.
Pull the magnet away and it stays ON.
When it sees the other pole of the magnet, it turns OFF.
And stays OFF untill it sees the first pole again.
Repeat.”