Originally Posted by Efrem
In general, credit is awarded when you get on the plane and get off somewhere else.
Note that many airlines offer multisegment flights with the same flight number on each segment, but requiring a plane change and connection (which can result in missing the connection due to the first segment being delayed on a "direct" flight). In other threads, people have claimed that FF mile collection on such flights is less than if a multisegment flight with different flight numbers is flown.