optimize block counting