Hi.
There are multiple ways to do this.
set a int value with the block count.
Every time a block is destroyed deduct 1 to that int when the int is 0 then (check with Int Compare)
another way is to have an array with the cubes, then when a cube is destroyed/disabled) remove it from the array.
and check the array count.