calculate how many blocks needed - Search