diff --git a/core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php b/core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php
index 430adecb50..ca600dd01e 100644
--- a/core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php
+++ b/core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php
@@ -59,6 +59,14 @@ public function getIterator() {
     return parent::getIterator();
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function count() {
+    $this->ensureLoaded();
+    return parent::count();
+  }
+
   /**
    * Automatically create the first item for computed fields.
    *
diff --git a/core/modules/path/tests/src/Unit/PathFieldItemListTest.php b/core/modules/path/tests/src/Unit/PathFieldItemListTest.php
new file mode 100644
index 0000000000..f1cf0fa522
--- /dev/null
+++ b/core/modules/path/tests/src/Unit/PathFieldItemListTest.php
@@ -0,0 +1,42 @@
+<?php
+
+namespace Drupal\Tests\path\Unit;
+
+use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\Field\FieldTypePluginManagerInterface;
+use Drupal\Core\TypedData\DataDefinitionInterface;
+use Drupal\Core\TypedData\TypedDataInterface;
+use Drupal\path\Plugin\Field\FieldType\PathFieldItemList;
+use Drupal\Tests\UnitTestCase;
+
+/**
+ * @coversDefaultClass \Drupal\path\Plugin\Field\FieldType\PathFieldItemList
+ * @group path
+ */
+class PathFieldItemListTest extends UnitTestCase {
+
+  /**
+   * @covers ::count
+   */
+  public function testCount() {
+    $definition = $this->prophesize(DataDefinitionInterface::class);
+    $definition->isComputed()
+      ->willReturn(TRUE)
+      ->shouldBeCalled();
+    $parent = $this->prophesize(TypedDataInterface::class);
+
+    $list = new PathFieldItemList($definition->reveal(), $parent->reveal());
+
+    $field_plugin_manager = $this->prophesize(FieldTypePluginManagerInterface::class);
+    $field_plugin_manager->createFieldItem($list, 0, NULL)
+      ->willReturn($this->prophesize(TypedDataInterface::class)->reveal())
+      ->shouldBeCalled();
+    $container = new ContainerBuilder();
+    $container->set('plugin.manager.field.field_type', $field_plugin_manager->reveal());
+    \Drupal::setContainer($container);
+    $this->assertEquals(1, count($list));
+    $this->assertEquals(TRUE, $list->isEmpty());
+    $this->assertEquals(1, count($list));
+  }
+
+}
