Regarding the stack exchange expalination, I see a circular reference: he could have adjusted block reward to get different total amounts. What if started with 100 BTC as first reward? Or 60? We would end up having different maximum number of bitcoins. So it might be a miscalculation, or a little bit of luck, or a mi tire of the two, but I dont buy the stack exchange post as an explanation on WHY 21 millions, rather than HOW...
So