--- includes/view.inc	2008-06-11 00:10:20.000000000 +0200
+++ includes/view.inc	2008-06-22 16:25:54.000000000 +0200
@@ -600,19 +600,18 @@
         db_set_active($this->base_database);
         $external = TRUE;
       }
-
-      // make count from subselect now
-      $count_query = "SELECT COUNT(*) FROM ($query) AS count_alias";
-
       $start = microtime();
       if (!empty($this->pager['items_per_page'])) {
-        // We no longer use pager_query() here because pager_query() does not
-        // support an offset. This is fine as we don't actually need pager
-        // query; we've already been doing most of what it does, and we
-        // just need to do a little more playing with globals.
-        $this->total_rows = db_result(db_query($count_query, $args));
-
         if (!empty($this->pager['use_pager'])) {
+          // We no longer use pager_query() here because pager_query() does not
+          // support an offset. This is fine as we don't actually need pager
+          // query; we've already been doing most of what it does, and we
+          // just need to do a little more playing with globals.
+    
+          // make count from subselect now
+          $count_query = "SELECT COUNT(*) FROM ($query) AS count_alias";
+          $this->total_rows = db_result(db_query($count_query, $args));
+          
           // dump information about what we already know into the globals
           global $pager_page_array, $pager_total, $pager_total_items;
           // total rows in query
