As a practical matter, it really doesn't matter
Use either measurement you please but the best way to set up the system is to first do open face run with fuel/prop to be used. Record the rpm.
Then install the exhaust system longer than the final length will be and shorten the system incrementally until the desired level of "tune" is achieved. As the system is shortened, there should be an increase in rpm, if not, something is wrong.
The desired level of tune will depend on your application. For max rpm the system will usually be somewhat shorter than would be used for general sport flying or for pattern flying since max rpm may not give the best throttle response. Good throttle response through the entire rpm range is necessary for Pattern/sport flying
BTW, I measured from the glow plug. But it doesn't really matter unless you are using the very same pipe/header/plug/fuel combo.