Neither, actually. It's the distance from the lense's focal plane, which should be somewhere between the front and the back lenses. Which is to say, you can't measure the distance with extreme precision because you don't know the focal plane's position, but such precision is not necessary anyway. Simply pick a point on the lense's body and measure from it.