Post 82, what you are failing on is you can repeat positions 2 thru 11 one more time each and it's not 3-fold. The first position can only occur once. But take your second position, why not do it AGAIN with White to move. Why not do the 3rd position a SECOND TIME with Black to move?
That's why 21 is the most without 3-fold repetition. Your first position once, your second thru 11th twice each makes 21.
Then, on the 22nd occurrence (your 12th), it will be 3-fold!
ThrillerFan
You might want to check your example. I put it into my chess program (Stockfish 8) and got three-fold repetition on move 6 (Note: it was one of the maneuvering positions rather than the subject position).
I may or may not have repeated in the maneuvering positions - don't know, don't care! There are a million ways to play the maneuvering moves. Alter them if you must. All I care about is the specific position that was repeated 21 times to illustrate the point!