The number of teeth on the existing cable must be known.
It uses a phone app GPS speedometer app. Drive the car at an indicated 60 MPH on the phone app. Note the indicated MPH on the car's speedometer. You already noted the number of teeth on the speedo gear. You now have three pieces of info you can use to calculate the fourth requirement, which will be the number of teeth on the gear to get the speedo reading correctly.
If speedometer reads higher than GPS, you will need more teeth than you currently have on the gear.
If speedometer reads lower than GPS, you will need fewer teeth on the driven gear.
Divide noted speedometer speed by GPS speed. That is "A".
Multiply "A" by the number of teeth on the existing gear. Result is number of teeth needed on the new gear. Pick a new gear with number of teeth closest to the resulting number.
This method removes all variables such as gear ratio, tire size, etc and will get it perfectly right every time.
All you have to know is the number of teeth on your driven gear that is installed in the car.