Say this is my itinerary:
STL-DFW 1141
DFW-SAT 2213
SAT-DFW 1433
DFW-STL 96
Four segments, no problem at all. You will make Gold (and earn the 25% status bonus miles) on the actual segment you use to cross the Gold threshold.
Not this time, but what you have to watch for is when you buy a flight with a stop - even if it involves a "change of gauge" (aircraft change) and it has the same flight number. E.g. AA 0048 (iirc, no longer exists) SFO-DFW-ZRH - counts as if it were nonstop SFO-ZRH.
And it gets confusing because sometimes AA may use the same flight number outbound and return - but these have not had problems posting separately, from reports here.