Why only put 21 million units in the source code?
Bitcoin will not reach 21000000 because every 210000 blocks you are only allow to create half of the previous btc allows to be created. So since the Genesis block is 50 Btc, it can be divided by half into 33 times.
Like this: