### Eclipse Workspace Patch 1.0
#P wordpress
Index: wp-includes/query.php
===================================================================
--- wp-includes/query.php	(revision 20287)
+++ wp-includes/query.php	(working copy)
@@ -830,7 +830,7 @@
  *
  * @since 1.5.0
  */
-class WP_Query {
+class WP_Query implements Countable {
 
 	/**
 	 * Query vars set by the user
@@ -3513,6 +3513,15 @@
 		global $wp_the_query;
 		return $wp_the_query === $this;
 	}
+
+	/**
+	 * Implementation of the Countable interface (PHP 5 >= 5.1.0) <http://php.net/countable>
+	 * 
+	 * @return int
+	 */
+	function count() {
+		return $this->post_count;
+	}
 }
 
 /**
