What is the maximum number of blocks?
There is no maximum number, blocks just keep getting
added to the end of the chain at an average rate of
one every 10 minutes.
Even when all 21 million coins have been generated?
Yes. The blocks are for proving that transactions
existed at a particular time. Transactions will
still occur once all the coins have been generated,
so blocks will still be created as long as people
are trading Bitcoins.
The long term averages are showing slightly more than 6 per hour. Over the short term the spacing between blocks varies pretty wildly. I sure would not want to rely on a clock powered by Bitcoin block times :-)