From time to time people ask about the Old Planter Monitor System I built using pulse counting and Android. This monitor used a 37 pin connector, an IOIO board, and a bunch of op amps for pulse counting to determine seeding rate.
The schematics can be found here: http://investordirection.com/schempdf.pdf
The old Github repo: https://github.com/johnsonjp34/farmchief
You can see the population/seed rate math in the PopulationMonitor.java file.
Do it again, I would use the NodeJS Serial library with Electron instead of Android!