how to calculate number of bricks