^ The specifics don't matter much to me because I'm a bit opposed to the whole idea that Moffat rushed us to the 13th incarnation just because he wanted to deal with it during his tenure.
That said, I believe the theory is that Tennant used up a regeneration's dose of energy during the meta-crisis but didn't actually regenerate, just repaired himself. Thus, 12 incarnations used up 12 regenerations of energy rather than the typical 11.
Capaldi is the 13th as you say but would've required 13 doses of regeneration energy to come into existence.
We already know it happens, but how?
Personally, what I think will happen is that Smith's incarnation thinks he can't regeneration. Honestly believes that he has regenerated all he can (given the scenario above) but then is surprised when he does regenerate. Thus the quotes that he's the last Doctor.
However, he's wrong. Why is the question. Guessing that it has something to do with the 2nd big bang and that he was actually the first incarnation of the recreated Doctor. But, it could be anything.