Resurrecting an old thread...
There were a couple of minor code errors in the example above, as well as only the parenthetical counts being within the link tags. The following is something you can copy and paste directly in and use as a starting point:
function wp_insert_post_counts($views){
//Run your query to count posts
$all_count = 100;
$publish_count = 200;
$future_count = 250;
$draft_count = 300;
$trash_count = 400;
//use wp_cache_set and wp_cache_get to optimize performance
$view_slugs = array(array('all', NULL, 'All', $all_count),
array('publish', 'publish', 'Published', $publish_count),
array('future', 'future', 'Scheduled', $future_count),
array('draft', 'draft', 'Draft', $draft_count),
array('trash', 'trash', 'Trash', $trash_count) );
$post_status_var = get_query_var('post_status');
$edit_url = admin_url( 'edit.php' );
$view_count = count($view_slugs);
for ($x = 0; $x < $view_count; $x++) {
$class = ($post_status_var == $view_slugs[$x][1]) ? ' class="current"' : '';
$post_status_temp = $view_slugs[$x][1];
if($post_status_temp != '') {
$post_status_temp = '?post_status='.$view_slugs[$x][1];
}
$views[$view_slugs[$x][0]] = sprintf(__('<a href="' .
$edit_url .
$post_status_temp . '"' .
$class .
' >' .
$view_slugs[$x][2] .
' <span class="count">(%d)</span></a>'),
$view_slugs[$x][3]);
}
return $views;
}
add_filter('views_edit-post', 'wp_insert_post_counts', 10, 1);
As suggested above, look at wp_count_posts to understand more about implementing your own post counts.