counting tiles