Added a method to reutnr the number of blocks