There are two ways to count the block number in the CAD drawing.
Method 1: Use the command: BLOCKSUM. You can also go to the entry from express tool: Express->Tools->Number of Blocks.
Method 2: Use the command eattext, you can get a CSV file and then you can get the number of blocks from the file.
CAD drawing software