diff --git a/core/modules/system/tests/src/Functional/System/StatusTest.php b/core/modules/system/tests/src/Functional/System/StatusTest.php
index cb81d05..586f00e 100644
--- a/core/modules/system/tests/src/Functional/System/StatusTest.php
+++ b/core/modules/system/tests/src/Functional/System/StatusTest.php
@@ -5,6 +5,7 @@
 use Drupal\Core\Url;
 use Drupal\Tests\BrowserTestBase;
 use Drupal\system\SystemRequirements;
+use Drupal\Core\StringTranslation\PluralTranslatableMarkup;
 
 /**
  * Tests output on the status overview page.
@@ -91,4 +92,28 @@ public function testStatusPage() {
     $this->assertResponse(200, 'The phpinfo page is reachable.');
   }
 
+  /**
+   * Tests that the Error and Warning element counts match the displayed value.
+   */
+  public function testElementCount() {
+    // Trigger "update notifications are not enabled" warning:
+    \Drupal::service('module_installer')->uninstall('update');
+
+    // Trigger "cron has not run recently" error:
+    \Drupal::state()->set('install_time', REQUEST_TIME);
+    \Drupal::state()->set('system.cron_last', 0);
+
+    $this->drupalGet('admin/reports/status');
+
+    $error_elements = $this->cssSelect('#error .system-status-report__requirements-group');
+    $this->assertNotEqual(count($error_elements), 0, 'Errors are listed on the page.');
+    $expected_text = new PluralTranslatableMarkup(count($error_elements), t('Error'), t('Errors'));
+    $this->assertText((string)$expected_text);
+
+    $warning_elements = $this->cssSelect('#warning .system-status-report__requirements-group');
+    $this->assertNotEqual(count($warning_elements), 0, 'Warnings are listed on the page.');
+    $expected_text = new PluralTranslatableMarkup(count($warning_elements), t('Warning'), t('Warnings'));
+    $this->assertText((string)$expected_text);
+  }
+
 }
