Update the total number of blocks only once in the header.
Moved block count to initialization.
Merge pull request #319 from nanan9177/blockly_fix

Update the total number of blocks only once in the header.