Updated 14.05.2011
We will look at some examples. In Europe there are at least two ways of "counting" the axels, the UIC classification and the Swiss system. There are two American ones, Whyte Notation, meant for steam engines, and AAR wheel arrangement, meant for electric and diesel engines. There may be even more, that I do not know anything about, so please send me an e-mail if you know something more. I normally refer to the UIC system.
Locomotives with the drive shafts supported directly in the locomotive chassis:
Märklin 34831, LAG 895:

This is a Bo locomotive. Two individually driven axels, without any mechanical
connection between the axels.
B means two driven axels, o means separately driven.
If the two axels were mechanically connected, either with rods or with cog
wheels, it would be B only
If only one axel was driven it would be a A1 or a 1A, depending on if the front or rear axel was
driven.
Driven axels are counted by letters, A=1 axel, B=2, C=3 etc.
The Märklin model is a B, as both axels are mechanically connected via an
internal shaft and cog wheels.
Märklin 26471, S.N.B D 1/3 Limmat:

This is a 2A locomotive. Two non driven axels and
one driven axel, all supported in the locomotive chassis. The Swiss calls
it a 1/3 locomotive.
The Swiss system count the number of powered axels, related to the total number
of axels. One powered axel / three axels in total.
The tender seems to be 2.
Märklin 3145, SNCF Y 50 101:

This is a C locomotive. C means that three driven axels are
mechanically connected, in this case with rods. In case of rods, often one axel
or a jack shaft is driven by the motor.
Märklin 2857, Könische Württembergische St. E. T5 1205 :

This is a 1' C 1'. In Switzerland 3/5 (three driven axels of total five),
in America 2-6-2
(two non-driven wheels - six driven wheels - two non-driven wheels)
1' indicates that one non-driven axel is supported in a separate frame, not
in the locomotive chassis itself.
Non-driven axels are counted by numbers, the ' indicates it the axel(s) are not
supported directly in the chassis, but in some kind of "sub frame".
The sub frame is supported in the chassis.
Märklin 37131, SBB Eb 3/5 5818:

This a Swiss 3/5 (three driven axels of total five), in America 2-6-2, otherwise 1' C 1'.
Märklin 26831, ÖBB 86 106:

This is a 1' D 1' locomotive, in Switzerland 4/6, in America 2-8-2.
Märklin 3308, DRG 85 006:

This is a 1' E 1' locomotive, or 5/7, or 2-10-2
Märklin 6106, DB 78 355:

This locomotive is 2' C 2', 3/7 or 4-6-4
Märklin 3417, NSB 63 2770:

This is a 1' E locomotive, 5/6 or 2-10-0. The tender is 2' 2'
Märklin 3100-2, DRG 03 124:

This is a 2' C 1' locomotive, 3/6 or 4-6-2. It has a 2' 2' tender
Märklin 3310, DB 012-081-6:

This is also a 2' C 1' locomotive, 3/6 or 4-6-2
This time the tender is 2' 3 (no ' after 3), as the three rear axels are
supported in the tender chassis.
Märklin 39050, DB 03 005

This is a 2' C 2' locomotive, 3/7 or 4-6-4. The tender is 2' 3.
Märklin 3100-1, DRG E04 17:

This is a 1' Co 1' locomotive, 3/5 or 2-6-2
Co because the three driven axels have one motor each and are not mechanically
connected.
Locomotives where the axels are
supported in separate bogies, the bogies are supported in the locomotive chassis:
Märklin 3772, DB 212 225-7:

This is a B' B' locomotive, 4/4 or 0-4-4-0
B' means that two driving axels are supported in one bogie, and that they are
mechanically connected. There are two bogies.
The model layout is 2' B'. Only the rear bogie is driven.
Märklin 3013, NS 1101:

This is a Bo' Bo'
Bo' means that two axels are supported in one bogie. Each axel have it's
own traction motor. There are two bogies.
The layout of this old Märklin model is actually a 1' B 1', with the bogie sides
connected to the front and rear non driven axels. The two driven centre
axels are supported in the locomotive chassis.
Märklin 39420, SBB Re 4/4I 10 015:

This is a Bo' Bo' locomotive, SBB calls it 4/4
The model layout is B' B', as both bogies are driven, mechanically connected.
Märklin 37320-1, SBB Re 6/6 11 687:

This is a Bo' Bo' Bo' locomotive, SBB calls it 6/6
Bo' means that two axels are supported in one bogie. Each axel have it's
own traction motor. There are three bogies.
The layout of the Märklin model is 2' 2' B', as only the rear bogie has driving
wheels.
Märklin 3137, NSB Di3a 3.623:

This is a Co' Co' locomotive, 6/6 in Switzerland, 0-6-6-0 in USA
Co' means that three axels are supported in one bogie. Each axel have it's
own traction motor. There are two bogies.
The Märklin model is a 3' C'.
Märklin 3300-2, DB 194 155-8:

This is a Co' Co' locomotive
Even though the front and rear end of this nice locomotive seems to be separate
parts, they are axel wise considered to be like bogies, thus Co' Co'.
The model is 3' C'.
Other combinations:
Märklin 26730, SSB Ae 6/8 13.304:

This is a (1' C) (C 1') locomotive, SBB calls it 6/8.
(1' C) means that one non-driven axel is supported in a "sub frame"
which is connected to the chassis, and that three connected driving axels are
supported in the chassis. The brackets indicate that there are two
separate wheel groups, individually supported in some central part.
It means that this is a "three piece" locomotive.
The Märklin model is (1' 3) (C 1'). Only three axels are driven.
Märklin 3068, NSB Di3b 3.641:

This is a A1A' A1A' locomotive
It looks like a Co' Co' (like NSB Di3a), but in this case the centre axel of each bogie
has no traction motor. In Switzerland this would be a 4/6 locomotive.
This old model from Märklin is 3' C'.
Märklin 37591, SBB Ae 8/14 11801:

This is a complicated one. Both (1A)A1A(A1) + (1A)A1A(A1) and (1'A)A1A(A1')
+ (1'A)A1A(A1') are mentioned in different literature. In Switzerland it
is simpler, just 8/14.
One non-driven and one driven axel separately supported, two driven axels in the
chassis with one non-driven between them, and finally one driven and one non-driven
axel separately supported. If that isn't enough, it's a double locomotive. The "+"
connects the two parts.
The layout of the Märklin model is 1' B' 1 2' 1' + 1' 2' 1 B' 1'.
Märklin 3148 x2, double traction NSB Di5 5.865:

This home made double locomotive combination is a C + C locomotive, or maybe
just two C locomotives?
The model layout is also C + C.
Märklin 3346, double locomotive DB 236 405-7 + 236 406-5:

This double locomotive is C + C, so is the model.