Example 8 A coach can travel from Nanjing to Shanghai on the Shanghai-Nanjing Expressway in $4 \mathrm{~h}$. It is known that a coach departs from Nanjing to Shanghai every half hour, and at the same time, a coach also departs from Shanghai to Nanjing. If a passenger takes a bus from Nanjing to Shanghai, how many coaches heading from Shanghai to Nanjing can he encounter during his entire journey? (Including the vehicles arriving at the Nanjing station and the vehicles leaving the Shanghai station.)

Explanation: This problem can be easily solved by just drawing a schematic diagram (Figure 6).

The traveler encounters 8 trains (including the one arriving at Nanjing station) in the first 2 hours (i.e., traveling half the distance). 2 hours after departure, they encounter exactly 1 train that departed from Shanghai to Nanjing at the same time. In the next 2 hours, they encounter another 8 trains (including the one leaving Shanghai station), totaling 17 trains, as shown by the number of intersection points in Figure 6.