The influence of the channel number on the optimal dispersion map (ODM) due to cross-phase modulation (XPM) in wavelength division multiplexed links is assessed using an analytical method. The analytical method is validated by comparison with numerical simulation using two different methods: the pump-probe method and a realistic method in which all channels are digitally modulated carriers. It is shown that there are usually, at least, two local ODMs due to XPM: one characterized by negative residual dispersion per span (RDPS) and another characterized by positive RDPS. These two local ODMs due to XPM lead to similar XPM-induced degradation. However, the local ODM with negative RDPS shows always much higher tolerance to the dispersion map (DM) variation. Furthermore, as the ODM due to the combined effect of self-phase modulation and group-velocity dispersion is characterized by negative RDPS when reduced and moderate power levels are used, the use of the local ODM due to XPM with negative RDPS is recommended. This local ODM due to XPM remains approximately the same as long as, at least, 8 channels are transmitted when 100 or 50 GHz channel spacings are used and 12 channels are transmitted when 25 GHz channel spacing is used. However, the high XPM tolerance to the DM variation for 25 GHz channel spacing leads to the conclusion that the ODM for 8 channels is the recommended DM in case of an arbitrary number of channels, independently of the channel spacing. These outcomes are independent of the power level, number and length of spans and transmission fiber type.