counting pieces on board