Let me see. I may not have been very clearheaded and have miscounted.
Left upper outside to right upper outside is 1 side of the square (distance between left and right).
Right upper outside to right upper inside is 0 (I was assuming no distance between inside/outside, maybe that's not a good assumption).
Right upper inside to left upper inside is 1 (distance between left and right again).
Left upper inside to left lower inside is 1. (between upper and lower).
Left lower inside to right lower inside is 1. (left/right).
Right lower inside to right lower outside is 0.
Right lower outside to left lower outside is 1. (right/left).
Overall, that's 5.
Meanwhile, if I do:
Left upper outside (0)
Left upper inside (0)
Right upper inside (1)
Right upper outside (1)
Right lower outside (2)
Right lower inside (2)
Left lower inside (3)
Left lower outside (3)
I get 3 (not 4, don't have to close the square).
Now, making it 1/0 is maybe not a fair assumption, but the width/height of your jaw seems higher to me than the width of your teeth, so minimizing the number of times you go left/right/up/down seems sensible, doesn't it?
TIL Don Knuth only brushes the sides of his teeth.