How many blocks are there in blockchain as of today? I have currently downloaded 300,000 blocks and the last one is generated 1 year and 19 weeks ago. I wonder how many blocks are more to go, before I am up to date.
There's a generic answer to this question that anyone can use, and an answer specific to users of Bitcoin Core (versions 0.10.0 or higher).

Generic version

Rather than directly answer your question with an answer that would become outdated within a few minutes as the next block was discovered, here's a general way you can look up the current number of blocks in the blockchain:


Go to this list of blockchain explorers.
Choose one (or choose several) and visit its website.
Almost all of them on their main page display the heights of recent blocks.
The height of a block is how many blocks there are before that block on the blockchain, so take the height of the highest block and add one—that's how many blocks there are on the blockchain.


Please note that it's not uncommon for blockchain explorers to be wrong about various facts, including the height of the highest valid block.  Visiting several sites decreases your risk of getting bad information without realizing it—if different sites disagree about the height by more than a single block, you'll know something is wrong.

For Bitcoin Core users

The getblockchaininfo RPC includes both the height of the highest downloaded block and the height of the highest valid-looking downloaded header.  On a fast connection, Bitcoin Core will typically download all the headers within two minutes of the time it is first started, so this number of headers is usually the total number of blocks on the best blockchain (minus one, since counting starts from zero).

{
  "chain": "main",
  "blocks": 381466,
  "headers": 381466,


The first few lines of getblockchaininfo on a fully-synced node

It's important to node that the headers count can conceivably go down if Bitcoin Core discovers the blocks that are supposed to be attached to those headers are invalid.  This most recently happened during the 4 July 2015 fork (although 0.10.0 and later Bitcoin Core nodes were unaffected) and it could also happen if there's a hard fork attempt that has the support of the majority of the network hash rate.

In Bitcoin Core GUI (Bitcoin-Qt), you can run the getblockchaininfo RPC by going to Help menu -> Debug item -> Console tab, and then typing in:

getblockchaininfo