Index: wp-includes/query.php
===================================================================
--- wp-includes/query.php	(revision 17637)
+++ wp-includes/query.php	(working copy)
@@ -2630,11 +2630,16 @@
 			$this->comment_count = count($this->comments);
 		}
 
-		if ( !$q['no_found_rows'] && !empty($limits) ) {
-			$found_posts_query = apply_filters_ref_array( 'found_posts_query', array( 'SELECT FOUND_ROWS()', &$this ) );
-			$this->found_posts = $wpdb->get_var( $found_posts_query );
-			$this->found_posts = apply_filters_ref_array( 'found_posts', array( $this->found_posts, &$this ) );
-			$this->max_num_pages = ceil($this->found_posts / $q['posts_per_page']);
+		if ( ! $q['no_found_rows'] ) {
+			if ( empty( $limits ) ) {
+				$this->found_posts = count( $this->posts );
+			}
+			else {
+				$found_posts_query = apply_filters( 'found_posts_query', 'SELECT FOUND_ROWS()', $this );
+				$this->found_posts = $wpdb->get_var( $found_posts_query );
+			}
+			$this->found_posts = apply_filters( 'found_posts', $this->found_posts, $this );
+			$this->max_num_pages = ceil( $this->found_posts / $q['posts_per_page'] );
 		}
 
 		// Check post status to determine if post should be displayed.
