How does an airborne DME unit differentiate itself?
As the Wikipedia article states, there are two modes - SEARCH and TRACK. In SEARCH mode, the DME interrogates with up to 150 pulse pairs per second. Similarly, in TRACK mode it interrogates at up to 30 PP/S.  

What it doesn't say is that the interrogations are not evenly spaced at a fixed rate. The DME uses a pseudorandom number generator to vary the transmission interval over a set range. Since the DME knows the timing sequence it sent, it can look for replies that match that sequence.   

The airborne DME can use the knowledge of when it made an interrogation and the maximum round-trip time for the maximum 200 nm range (just over 2.5 msec) to avoid non-correlated replies (to other a/c). The higher rate in SEARCH gives it more opportunity to detect the replies as it has no knowledge of range in search and thus has to scan for the entire range. Once it has detected the ground station replies by finding a correlated sequence of pulse pairs, it can switch to TRACK mode. The lower rate is acceptable once the range is established and the reply window can be narrowed.  

As a note; mode X and Y are in use and differ only in the pulse pair timing, 12 usec  for X and 30 usec for Y.  Modes W and Z were set for DME/P and to my knowledge are not in current use.