For anyone interested in changing the "Discussion" section to show the pending post count instead of having it all in "content" the right_now_discussion_table_end hook can be used like so:
add_action( 'right_now_discussion_table_end', 'my_add_counts_to_rightnow_discussion' );
function my_add_counts_to_rightnow_discussion() {
// Custom post types counts
$post_types = get_post_types( array( '_builtin' => false, 'public' => true , 'show_ui' => true), 'objects' );
foreach ( $post_types as $post_type ) {
if ( current_user_can( 'edit_posts' ) ) {
$num_posts = wp_count_posts( $post_type->name );
$text = _n( $post_type->labels->singular_name, $post_type->labels->name, $num_posts->publish );
$num = number_format_i18n( $num_posts->pending );
$post_types = get_post_types( array( '_builtin' => false, 'public' => true , 'show_ui' => true), 'objects' );
$num = '<a href="edit.php?post_status=pending&post_type=' . $post_type->name . '">' . $num . '</a>';
$text = '<a class="waiting" href="edit.php?post_status=pending&post_type=' . $post_type->name . '">' . $text . ' Pending </a>';
echo '<td class="first b b-' . $post_type->name . 's">' . $num . '</td>';
echo '<td class="t ' . $post_type->name . 's">' . $text . '</td>';
echo '</tr>';
}
}
}
I also removed the if(pending >0) this way the post types will line up with the count on the left. If you use this code just use Sébastien or Adam's code for the counts and remove the pending section.
Also note, I added a check to see if the post types were public and set to show in the UI. This can be added to either of the other's code.