Presumably if there are versions of a gear wheel with different numbers of teeth then they have to be matched in pairs? The spacing between adjacent teeth will be slightly different.
Ah, modulus and pitch circle diameter! In essence, yes. Someone will wince when they read this, but it is about right.
Imagine you took the outside a gear, cut the bit with the teeth on off, straightened it out and laid it out as a flat strip (like a rack on a rack and pinion). It would be a certain length, have a certain number of teeth and the teeth would have a certain shape. If you want to make another gear that runs properly with it, making up another strip with the same shape teeth and wrapping it round a circle would work fine, so long as the length is a whole number of teeth. That means you can make any number of teeth mesh with any other number of teeth (unless the number gets too small and doesn't wrap nicely around the circle).
However, from the length of the strip, which is the circumference of a circle, divided by Pi (approximately 3.14) you can get the diameter of the circle it will wrap around. If you have two gears running together, you can then use the radius of each gear (minus the amount they mesh by, which is dependent on the shape) to work out how far apart the centres of the shafts they run on should be. If you change one gear for another with the same tooth shape it will will run perfectly if you adjust the spacing. However in a gearbox where the spacing is fixed, you have to select ratios which will run properly as pairs of the right diameter, and/or change the tooth shape to make them fit.
As an aside, this is why the arrangement for the gear-cutting train on a lathe allows the gear train to be slid up and down to change the centre distance.
So, if your meccano gears had the same shape teeth, you would have been able to set them up any way you liked if you had a way to adjust the centre distance but otherwise you would have to pair them correctly to get them to mesh properly. If they had different shaped teeth there would be no way to pair them.
Alec