Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 17581)
+++ wp-includes/post.php	(working copy)
@@ -1796,7 +1796,7 @@
 
 	$count = wp_cache_get($cache_key, 'counts');
 	if ( false !== $count )
-		return $count;
+		return apply_filters( 'count_posts', $count, $type, $perm );
 
 	$count = $wpdb->get_results( $wpdb->prepare( $query, $type ), ARRAY_A );
 
@@ -1810,7 +1810,7 @@
 	$stats = (object) $stats;
 	wp_cache_set($cache_key, $stats, 'counts');
 
-	return $stats;
+	return apply_filters( 'count_posts', $stats, $type, $perm );
 }
 
 