count images in block