The mileage awards are based on stopovers, not connecting cities. If you stay somewhere (within the context of the whole itinerary) for more than 24 hours, it's a point that counts towards total mileage.
For example: JFK-YVR-HKG-AKL counts as JFK-AKL if you don't stay longer than 24 hours at YVR/HKG.
Your example should count as SFO-LHR only for mileage award calculations.
Does that help?