OK, more correctly they are all Wxxnnn, where xx can be DB, DC, DD or MX. My point, though, was that the W (or Wxx) prefix refers generically to the range, while the other prefixes denote specific body derivatives.
The R171 is officially type WDB171 (or W171 for short), while its 'Typ' designation is indeed just 171. However, as there is only one body style, it is almost universally referred to as R171.
All of the current range, including the 'W164' and 'X164', have a Typ designation consisting of just 3 digits with no prefix, as is borne out by the VIN plates, so those last two are both derivatives of Typ 164. Similarly, the CL203's VIN starts 'WDB203' and its Typ designation is just plain ol' 203. Not disputing that where there's a saloon model in the range, this will claim the W prefix by default these days, but I still maintain that it also relates to the range (or platform) as a whole.
Now, back to those VIN prefixes. Presumably the definitive 'WDB' stands "Wagen Daimler Benz", 'WDC' (M, GL and R Class) would be DaimlerChrysler and 'WDD' (A, B, S, CL and CLS Class) would be Daimler AG. Any idea what determined which prefix models received? It doesn't seem to be directly related to their development/launch dates (R171 was well into the DC era, for instance). And what about the 'WMX'-prefixed SLS: how does 'MX' relate to Mercedes-AMG?