counting stacking blocks