One flight number, even if you have to change planes at the stop over, counts as only one segment no matter how many times it stops.
It really sucks when they change two different flight numbers (say the flight from New York to DC, and then DC to Atlanta) into one flight number, I did that one a bit and lost the 500 minimum on each segment when they changed it.