diff --git a/src/Lunr/Gravity/Database/SQLite3/SQLite3QueryResult.php b/src/Lunr/Gravity/Database/SQLite3/SQLite3QueryResult.php
index b6212633870cf6a507d41afae6cd354a284a1885..35efae7387177f4e261e77f8d56881a17460b5a7 100644
--- a/src/Lunr/Gravity/Database/SQLite3/SQLite3QueryResult.php
+++ b/src/Lunr/Gravity/Database/SQLite3/SQLite3QueryResult.php
@@ -225,6 +225,11 @@ class SQLite3QueryResult implements DatabaseQueryResultInterface
     {
         $count = 0;
 
+        if (!is_object($this->result))
+        {
+            return $count;
+        }
+
         while ($this->result->fetchArray(SQLITE3_ASSOC))
         {
             $count++;
diff --git a/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultBaseTest.php b/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultBaseTest.php
index 062de6917c213b995e8689bd68c3d419f0407d5b..c780e51cdd936e681eb077c8a6f905de33886d37 100644
--- a/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultBaseTest.php
+++ b/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultBaseTest.php
@@ -87,18 +87,18 @@ class SQLite3QueryResultBaseTest extends SQLite3QueryResultTest
     /**
      * Test that affected_rows() returns a number.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::affected_rows
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::affected_rows
      */
     public function testAffectedRowsReturnsNumber()
     {
         $this->set_reflection_property_value('affected_rows', 12);
         $this->assertSame(12, $this->class->affected_rows());
     }
-
+ 
     /**
      * Test that error_message() returns a string.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::error_message
+     * @covers Lunr\Gravity\Database\SQLite3\SQlite3QueryResult::error_message
      */
     public function testErrorMessageReturnsString()
     {
@@ -109,7 +109,7 @@ class SQLite3QueryResultBaseTest extends SQLite3QueryResultTest
     /**
      * Test that error_number() returns a number.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::error_number
+     * @covers Lunr\Gravity\Database\SQLite3\SQlite3QueryResult::error_number
      */
     public function testErrorNumberReturnsNumber()
     {
@@ -120,7 +120,7 @@ class SQLite3QueryResultBaseTest extends SQLite3QueryResultTest
     /**
      * Test that insert_id() returns a number.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::insert_id
+     * @covers Lunr\Gravity\Database\SQLite3\SQlite3QueryResult::insert_id
      */
     public function testInsertIDReturnsNumber()
     {
@@ -131,7 +131,7 @@ class SQLite3QueryResultBaseTest extends SQLite3QueryResultTest
     /**
      * Test that query() returns a string.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::query
+     * @covers Lunr\Gravity\Database\SQLite3\SQlite3QueryResult::query
      */
     public function testQueryReturnsString()
     {
diff --git a/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultFailedTest.php b/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultFailedTest.php
index 7d3683527a4693a7cbfac6799d4d6fd662b4bc5d..64762e3b258cb8f5cad70fb3788311ef1858430d 100644
--- a/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultFailedTest.php
+++ b/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultFailedTest.php
@@ -62,7 +62,7 @@ class SQLite3QueryResultFailedTest extends SQLite3QueryResultTest
     /**
      * Test that the has_failed() method returns TRUE.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::has_failed
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::has_failed
      */
     public function testHasFailedReturnsTrue()
     {
@@ -108,7 +108,7 @@ class SQLite3QueryResultFailedTest extends SQLite3QueryResultTest
     /**
      * Test that result_array() returns an empty array.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::result_array
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::result_array
      */
     public function testResultArrayReturnsEmptyArray()
     {
@@ -121,7 +121,7 @@ class SQLite3QueryResultFailedTest extends SQLite3QueryResultTest
     /**
      * Test that result_row() returns an empty array.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::result_row
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::result_row
      */
     public function testResultRowReturnsEmptyArray()
     {
@@ -134,7 +134,7 @@ class SQLite3QueryResultFailedTest extends SQLite3QueryResultTest
     /**
      * Test that result_column() returns an empty array.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::result_column
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::result_column
      */
     public function testResultColumnReturnsEmptyArray()
     {
@@ -147,7 +147,7 @@ class SQLite3QueryResultFailedTest extends SQLite3QueryResultTest
     /**
      * Test that result_cell() returns NULL.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::result_cell
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::result_cell
      */
     public function testResultCellReturnsNull()
     {
@@ -157,7 +157,7 @@ class SQLite3QueryResultFailedTest extends SQLite3QueryResultTest
     /**
      * Test that the has_deadlock() method returns TRUE.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::has_deadlock
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::has_deadlock
      */
     public function testHasDeadlockReturnsTrue()
     {
@@ -169,7 +169,7 @@ class SQLite3QueryResultFailedTest extends SQLite3QueryResultTest
     /**
      * Test that the has_deadlock() method returns FALSE.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::has_deadlock
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::has_deadlock
      */
     public function testHasDeadlockReturnsFalse()
     {
diff --git a/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultFreeTest.php b/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultFreeTest.php
index f9c4aa4e4cb23fcb902f844ae0294ca40ad16793..eeb92a4d771bf8a21e3c4132969e0dc12bac887c 100644
--- a/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultFreeTest.php
+++ b/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultFreeTest.php
@@ -32,7 +32,7 @@ class SQLite3QueryResultFreeTest extends SQLite3QueryResultTest
     /**
      * Test that free_result() does try to free the result data if freed is FALSE.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::free_result
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::free_result
      */
     public function testFreeResultFreesIfFreedIsFalse()
     {
@@ -46,7 +46,7 @@ class SQLite3QueryResultFreeTest extends SQLite3QueryResultTest
     /**
      * Test that free_result() does not try to free the result data if freed is TRUE.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::free_result
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::free_result
      */
     public function testFreeResultDoesNotFreeIfFreedIsTrue()
     {
@@ -64,7 +64,7 @@ class SQLite3QueryResultFreeTest extends SQLite3QueryResultTest
     /**
      * Test that result_array() will free the fetched data if freed is FALSE.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::result_array
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::result_array
      */
     public function testResultArrayFreesDataIfFreedIsFalse()
     {
@@ -77,7 +77,7 @@ class SQLite3QueryResultFreeTest extends SQLite3QueryResultTest
     /**
      * Test that result_array() will not free the fetched data if freed is TRUE.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::result_array
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::result_array
      */
     public function testResultArrayDoesNotFreeDataIfFreedIsTrue()
     {
@@ -92,7 +92,7 @@ class SQLite3QueryResultFreeTest extends SQLite3QueryResultTest
     /**
      * Test that result_row() will free the fetched data if freed is FALSE.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::result_row
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::result_row
      */
     public function testResultRowFreesDataIfFreedIsFalse()
     {
@@ -105,7 +105,7 @@ class SQLite3QueryResultFreeTest extends SQLite3QueryResultTest
     /**
      * Test that result_row() will not free the fetched data if freed is TRUE.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::result_row
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::result_row
      */
     public function testResultRowDoesNotFreeDataIfFreedIsTrue()
     {
@@ -120,7 +120,7 @@ class SQLite3QueryResultFreeTest extends SQLite3QueryResultTest
     /**
      * Test that result_column() will free the fetched data if freed is FALSE.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::result_column
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::result_column
      */
     public function testResultColumnFreesDataIfFreedIsFalse()
     {
@@ -133,7 +133,7 @@ class SQLite3QueryResultFreeTest extends SQLite3QueryResultTest
     /**
      * Test that result_column() will not free the fetched data if freed is TRUE.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::result_column
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::result_column
      */
     public function testResultColumnDoesNotFreeDataIfFreedIsTrue()
     {
@@ -148,7 +148,7 @@ class SQLite3QueryResultFreeTest extends SQLite3QueryResultTest
     /**
      * Test that result_cell() will free the fetched data if freed is FALSE.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::result_cell
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::result_cell
      */
     public function testResultCellFreesDataIfFreedIsFalse()
     {
@@ -161,7 +161,7 @@ class SQLite3QueryResultFreeTest extends SQLite3QueryResultTest
     /**
      * Test that result_cell() will not free the fetched data if freed is TRUE.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::result_cell
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::result_cell
      */
     public function testResultCellDoesNotFreeDataIfFreedIsTrue()
     {
diff --git a/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultNoResultTest.php b/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultNoResultTest.php
index 022331a2bdc5cf62b1797a94f428bfa6c2e1ea4b..1ce6bbde042bcde49116efa80eb87b5cf5c4911f 100644
--- a/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultNoResultTest.php
+++ b/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultNoResultTest.php
@@ -61,7 +61,7 @@ class SQLite3QueryResultNoResultTest extends SQLite3QueryResultTest
     /**
      * Test that the has_failed() method returns FALSE.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::has_failed
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::has_failed
      */
     public function testHasFailedReturnsFalse()
     {
@@ -71,7 +71,7 @@ class SQLite3QueryResultNoResultTest extends SQLite3QueryResultTest
     /**
      * Test that result_array() returns an empty array.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::result_array
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::result_array
      */
     public function testResultArrayReturnsEmptyArray()
     {
@@ -84,7 +84,7 @@ class SQLite3QueryResultNoResultTest extends SQLite3QueryResultTest
     /**
      * Test that result_row() returns an empty array.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::result_row
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::result_row
      */
     public function testResultRowReturnsEmptyArray()
     {
@@ -97,7 +97,7 @@ class SQLite3QueryResultNoResultTest extends SQLite3QueryResultTest
     /**
      * Test that result_column() returns an empty array.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::result_column
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::result_column
      */
     public function testResultColumnReturnsEmptyArray()
     {
@@ -110,7 +110,7 @@ class SQLite3QueryResultNoResultTest extends SQLite3QueryResultTest
     /**
      * Test that result_cell() returns NULL.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::result_cell
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::result_cell
      */
     public function testResultCellReturnsNull()
     {
diff --git a/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultResultTest.php b/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultResultTest.php
index f327440a99502cfdf1798db4f2d83d71c52b71ab..31118ce13807a10c370c548cafb37c8891166fac 100644
--- a/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultResultTest.php
+++ b/src/Lunr/Gravity/Database/SQLite3/Tests/SQLite3QueryResultResultTest.php
@@ -50,7 +50,7 @@ class SQLite3QueryResultResultTest extends SQLite3QueryResultTest
     /**
      * Test that the has_failed() method returns FALSE.
      *
-     * @covers Lunr\Gravity\Database\MySQL\MySQLQueryResult::has_failed
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::has_failed
      */
     public function testHasFailedReturnsFalse()
     {
@@ -69,6 +69,24 @@ class SQLite3QueryResultResultTest extends SQLite3QueryResultTest
     }
 
     /**
+     * Test that number_of_rows() returns a number.
+     *
+     * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::number_of_rows
+     */
+    public function testNumberOfRowsReturnsNumber()
+    {
+        $row = array('col1' => 'val1', 'col2' => 'val2');
+
+        $this->sqlite3_result->method('fetchArray')
+                             ->will($this->onConsecutiveCalls($row, $row, $row, FALSE));
+
+        $value = $this->class->number_of_rows();
+
+        $this->assertInternalType('int', $value);
+        $this->assertEquals(3, $value);
+    }
+
+    /**
      * Test that result_row() returns an one-dimensional array.
      *
      * @covers Lunr\Gravity\Database\SQLite3\SQLite3QueryResult::result_row
