diff --git a/core/lib/Drupal/Core/Queue/DatabaseQueue.php b/core/lib/Drupal/Core/Queue/DatabaseQueue.php
index eaa6757..27e4e33 100644
--- a/core/lib/Drupal/Core/Queue/DatabaseQueue.php
+++ b/core/lib/Drupal/Core/Queue/DatabaseQueue.php
@@ -100,7 +100,7 @@ protected function doCreateItem($data) {
    */
   public function numberOfItems() {
     try {
-      return $this->connection->query('SELECT COUNT(item_id) FROM {' . static::TABLE_NAME . '} WHERE name = :name', array(':name' => $this->name))
+      return (int) $this->connection->query('SELECT COUNT(item_id) FROM {' . static::TABLE_NAME . '} WHERE name = :name', array(':name' => $this->name))
         ->fetchField();
     }
     catch (\Exception $e) {
diff --git a/core/lib/Drupal/Core/Queue/QueueInterface.php b/core/lib/Drupal/Core/Queue/QueueInterface.php
index 6d86224..83f3ef7 100644
--- a/core/lib/Drupal/Core/Queue/QueueInterface.php
+++ b/core/lib/Drupal/Core/Queue/QueueInterface.php
@@ -37,7 +37,7 @@ public function createItem($data);
    * result might only be valid for a fraction of a second and not provide an
    * accurate representation.
    *
-   * @return
+   * @return int
    *   An integer estimate of the number of items in the queue.
    */
   public function numberOfItems();
