This is how:
Google URL Shortener is currently
available for Google products and not
for broader consumer use.
I don't believe even Google has 7 million pages worth shortening.
Edit:
Apparently you can shorten URLs using the Google Toolbar:
Google URL shortener is not a
stand-alone service; you can't use it
to shorten links directly. Currently,
Google URL Shortener is only available
from the Google Toolbar and
FeedBurner. If the service proves
useful, we may eventually make it
available for a wider audience in the
future.
Still, that is not "broad" consumer use. If they run out, they'll add more letters.
Response to updated question:
Say fn(some url)-> four letter for url, how can they suddenly use the same function which gives five letter for url after sometime?
Google is not simply hashing the URL then just using it (remember, hashes are only 1 way so you couldn't get the original URL out of them anyway - it must be stored in a database). They may start with a hash, then perform a lookup in a database to see if that key already exists. If it does not, it will be used as the key. If it already exists, they'll use some other method to perform the hash, or manipulate the hash in a way that makes it unique.
How will they know whether it is in four letter or five letter url from url?
If the end of the URL has 4 letters, then that's how they know...