Added function to Marker class to calculate number of pieces.