If I have a Blockly workspace, how can I get the total number of blocks that are being used?
workspace.getAllBlocks(false).length
Docs: https://developers.google.com/blockly/reference/js/Blockly.Workspace#getAllBlocks