how to calculate block quantity - Search