private int numPieces( int player ) {
		
		int total = 0;
		
		if( player == 1 ){
			
			//counts how many pieces are player ones
			for( int row = 0 ; row < 8 ; row++ )
			{
			
				for( int column = (row + 1) % 2 ; column < MAX_COLUMNS ; column += 2 )
				{
					if( isPlayerOne( new Coordinate( column, row) ) ){
				
						total++;
					}
				}
			}
			
			return total;
		}
		
		//counts how many pieces are player twos
		for( int row = 0 ; row < 8 ; row++ )
		{
			
			for( int column = (row + 1) % 2 ; column < MAX_COLUMNS ; column += 2 )
			{
				if( isPlayerTwo( new Coordinate( column, row) ) ){
				
					total++;
				}
			}
		}
		
		return total;
		
	}