No. I did something similar recently. The 4 segments are only the segments within the continent. The segments into or out of the continent do count towards the 4 seg rule.
Keep in mind that if you were to do something like SIN-HKG-SYD, connecting in HKG on your way to SYD, the SIN-HKG segment would count towards one of the 4 segments within Asia even though it is being used only to connect to a segment that leaves Asia.