I would imagine it would just be the total of the legs, but within reason. ie. doing orbits before flying to two nearby airfields probably doesn't count!
A dog-leg over an enroute VOR would be more common.
There might be a further stipulation on the distance of the away landings from base, like the PPL (50nm), but I can't find it following a brief search