Ah, the infamous 'idle gear' mystery.
Between the driving gear and the driven gear you can have any number and sizes of idle gears. The actual ratio is defined by the driving/driven gears only.
If you imagine a 40 tooth driving, and a 40 tooth driven (end of a chain), and a 40 tooth idle, then for each tooth of the driving that passes, one tooth of the driven passes.
Now imagine a 100 tooth idler instead of the 40 tooth idler. It remains that for each tooth of the driving that passes, one tooth of the driven passes. The tooth count of the idler(s) is irrevelant.
On your lathe, the driving gear is, of course, the spindle gear.
The driven gear is the first gear in the chain that uses a mated step-up or step-down gear (or the final leadscrew gear), and its mated gear becomes the driving gear for the next chain.
If you had no step/up or step-down mated-gearing, just idlers between the spindle gear and leadscrew gear, then the ratio would be just (spindle gear) / (leadscrew gear).
Edit: However, having an odd number or even number of idler gears controls direction, forward or reverse...
Fun stuff, huh?