Briefly-
The Alco 539s were 19 pin. Some of the early other Alcos (FAs, RS-2, -3) were 21 pin. I've seen drawings for 16 pin on early EMD switchers. I believe some of the early passenger units (DL-109 and Es) were also 16 pin. I won't even address BLW and some F-Ms with the air throttles. GE 44 tonners could get by with 12?
The manufacturers at first used pretty much the number of wires needed to do the job at hand. There was no sense in adding wires and pins for boiler flameout or boiler blowdown on an NW-2 switcher, for example. A switcher was not likely to have dynamic brakes, so those wires weren't included, either.
There were adaptor cables, such as 27 pin on one end and 21 pins on the other. I recently built up, rebuilt actually, a 12 to 27 pin cable, for a special application. Today, with the 27 pin standard cable, there is room for growth/options as not all circuits are used. It is a good idea to run all wires end to end on a locomotive, however. This will let a unit without dynamics, as an example, to run between units with DB.
Ages ago, Trains Magazine had an article called 'Lash 'em Up' which covered MU in some detail. (I do take exception to the mis-information about the reversing toggle switch, however. Doesn't work that way-).
EDM