count blocks in dat.c