 .../path/src/Plugin/Field/FieldType/PathFieldItemList.php |  3 +++
 core/modules/path/src/Plugin/Field/FieldType/PathItem.php |  2 +-
 .../path/src/Plugin/Field/FieldWidget/PathWidget.php      |  2 +-
 core/modules/path/tests/src/Kernel/PathItemTest.php       | 15 +++++++++++++++
 4 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php b/core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php
index 1a5fbe0..ad1d762 100644
--- a/core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php
+++ b/core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php
@@ -39,6 +39,9 @@ protected function computeValue() {
     }
 
     $this->list[0] = $this->createItem(0, $value);
+    // If no alias actually exists remove the empty item. This ensures that
+    // count() will not return 1 for an empty list.
+    $this->filterEmptyItems();
   }
 
   /**
diff --git a/core/modules/path/src/Plugin/Field/FieldType/PathItem.php b/core/modules/path/src/Plugin/Field/FieldType/PathItem.php
index 65cb14b..1f4246b 100644
--- a/core/modules/path/src/Plugin/Field/FieldType/PathItem.php
+++ b/core/modules/path/src/Plugin/Field/FieldType/PathItem.php
@@ -47,7 +47,7 @@ public static function schema(FieldStorageDefinitionInterface $field_definition)
    * {@inheritdoc}
    */
   public function isEmpty() {
-    return ($this->alias === NULL || $this->alias === '') && ($this->pid === NULL || $this->pid === '') && ($this->langcode === NULL || $this->langcode === '');
+    return ($this->alias === NULL || $this->alias === '') && ($this->pid === NULL || $this->pid === '');
   }
 
   /**
diff --git a/core/modules/path/src/Plugin/Field/FieldWidget/PathWidget.php b/core/modules/path/src/Plugin/Field/FieldWidget/PathWidget.php
index 13ab1f1..8d3badf 100644
--- a/core/modules/path/src/Plugin/Field/FieldWidget/PathWidget.php
+++ b/core/modules/path/src/Plugin/Field/FieldWidget/PathWidget.php
@@ -47,7 +47,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
      ];
     $element['langcode'] = [
       '#type' => 'value',
-      '#value' => $items[$delta]->langcode,
+      '#value' => $items[$delta]->langcode ?: $entity->language()->getId(),
     ];
     return $element;
   }
diff --git a/core/modules/path/tests/src/Kernel/PathItemTest.php b/core/modules/path/tests/src/Kernel/PathItemTest.php
index d7627c3..43360fa 100644
--- a/core/modules/path/tests/src/Kernel/PathItemTest.php
+++ b/core/modules/path/tests/src/Kernel/PathItemTest.php
@@ -49,16 +49,31 @@ public function testPathItem() {
 
     $node_storage = \Drupal::entityTypeManager()->getStorage('node');
 
+    // First test with an entity that doesn't have the path field set.
+    $node = Node::create([
+      'title' => 'Testing no path',
+      'type' => 'foo',
+    ]);
+    $this->assertTrue($node->get('path')->isEmpty());
+    $this->assertEquals(0, count($node->get('path')));
+
+    $node->save();
+    $this->assertTrue($node->get('path')->isEmpty());
+    $this->assertEquals(0, count($node->get('path')));
+
+    // Test with an entity with path field set.
     $node = Node::create([
       'title' => 'Testing create()',
       'type' => 'foo',
       'path' => ['alias' => '/foo'],
     ]);
     $this->assertFalse($node->get('path')->isEmpty());
+    $this->assertEquals(1, count($node->get('path')));
     $this->assertEquals('/foo', $node->get('path')->alias);
 
     $node->save();
     $this->assertFalse($node->get('path')->isEmpty());
+    $this->assertEquals(1, count($node->get('path')));
     $this->assertEquals('/foo', $node->get('path')->alias);
 
     $stored_alias = $alias_storage->lookupPathAlias('/' . $node->toUrl()->getInternalPath(), $node->language()->getId());
