Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 17614)
+++ wp-includes/post.php	(working copy)
@@ -1839,7 +1839,7 @@
 	}
 	$stats['trash'] = $wpdb->get_var( "SELECT COUNT( * ) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_status = 'trash' $and");
 
-	return (object) $stats;
+	return apply_filters( 'count_attachments', (object) $stats, $mime_type );
 }
 
 /**
