Josh...
It's the Whyte system of notation - and yes, in a way, it does refer to axles - although indirectly by actually counting the number of wheels. I believe the French method counts axles.
A 4-6-2 (for example) is a "Pacific" type steam loco. It has 4 wheels (two axles) on the pilot or lead truck, 6 powered driving wheels (three axles) and a trailing truck (under the firebox) with 2 wheels/one axle.
Some locos with more than one set of drivers uses an addional number - like Challengers, Big Boys, etc - e.g. 2-6-6-6. This implies two pilot wheels, two sets of six drivers (three axles each) and a trailing truck with six wheels.
Where there are no wheels, it is noted with a zero - e.g. small switching engine 0-6-0 with six drivers only and no lead or trailing truck.
Additions are used for things like Mallet engines - 4-6-2+2-6-4, and other specifics may use letters, like adding "T" for tank engine. Thomas is a 0-6-0T
Andrew