In a slightly earlier version of Satoshi's code (pre-genesis) the limit was 20 million bitcoins. Blocks were set to arrive every 15 minutes with an initial subsidy of 100 BTC set to halve every 100`000 blocks (about 2 years and 10 months).
Certainly there was some thought put into the magnitude of the limit. While Satoshi had 63-bits of space to play with (using signed 64-bit integers at the time) it seems possible that he intentionally confined bitcoin amounts to well within 53-bits so that amounts could be handled comfortably by the
IEEE 754 binary64 datatype (potentially useful for JSON-RPC).
What we can be reasonably sure of is that the particular figure of 21 million arose simply as part of some last-minute tweaking and carries no deeper meaning.
Interesting - where is this code available to support your claim (not that I don't believe you, but I'd like to see it).
I'm surprised I didn't provide a link to begin with. I must have been in a hurry.
Cryddit posted the source of an alpha snapshot of the reference client
here. Search the page for "GetNextWorkRequired". You should find all the information you're looking for within this function.
Please let me know if you end up with different numbers. I routinely screw up idle calculations.