Index: bbp-admin/bbp-functions.php
===================================================================
--- bbp-admin/bbp-functions.php	(revision 2792)
+++ bbp-admin/bbp-functions.php	(working copy)
@@ -164,6 +164,8 @@
 /**
  * Recount forum topics
  *
+ * @todo Forum total topic recount
+ *
  * @since bbPress (r2613)
  *
  * @uses wpdb::query() To run our recount sql queries
@@ -176,11 +178,11 @@
 	$statement = __( 'Counting the number of topics in each forum&hellip; %s', 'bbpress' );
 	$result    = __( 'Failed!', 'bbpress' );
 
-	$sql_delete = "DELETE FROM `{$wpdb->postmeta}` WHERE `meta_key` = '_bbp_forum_topic_count';";
+	$sql_delete = "DELETE FROM `{$wpdb->postmeta}` WHERE `meta_key` IN ( '_bbp_forum_topic_count', '_bbp_forum_total_topic_count' );";
 	if ( is_wp_error( $wpdb->query( $sql_delete ) ) )
 		return array( 1, sprintf( $statement, $result ) );
 
-	$sql = "INSERT INTO `{$wpdb->postmeta}` (`post_id`, `meta_key`, `meta_value`) (SELECT `post_parent`, '_bbp_forum_topic_count', COUNT(`post_status`) as `meta_value` FROM `{$wpdb->posts}` WHERE `post_type` = '{$bbp->topic_id}' AND `post_status` = 'publish' GROUP BY `post_parent`);";
+	$sql = "INSERT INTO `{$wpdb->postmeta}` (`post_id`, `meta_key`, `meta_value`) (SELECT `post_parent`, '_bbp_forum_topic_count', COUNT(`post_status`) as `meta_value` FROM `{$wpdb->posts}` WHERE `post_type` = '{$bbp->topic_id}' AND `post_status` IN ( '" . join( "', '", array( 'publish', $bbp->closed_status_id ) ) . "' ) GROUP BY `post_parent`);";
 	if ( is_wp_error( $wpdb->query( $sql ) ) )
 		return array( 2, sprintf( $statement, $result ) );
 
@@ -191,6 +193,8 @@
 /**
  * Recount forum replies
  *
+ * @todo Make the recounts actually work
+ *
  * @since bbPress (r2613)
  *
  * @uses wpdb::query() To run our recount sql queries
@@ -203,7 +207,7 @@
 	$statement = __( 'Counting the number of replies in each forum&hellip; %s', 'bbpress' );
 	$result    = __( 'Failed!', 'bbpress' );
 
-	$sql_delete = "DELETE FROM `{$wpdb->postmeta}` WHERE `meta_key` = '_bbp_forum_reply_count';";
+	$sql_delete = "DELETE FROM `{$wpdb->postmeta}` WHERE `meta_key` IN ( '_bbp_forum_reply_count', '_bbp_forum_total_reply_count' );";
 	if ( is_wp_error( $wpdb->query( $sql_delete ) ) )
 		return array( 1, sprintf( $statement, $result ) );
 
Index: bbp-includes/bbp-forum-functions.php
===================================================================
--- bbp-includes/bbp-forum-functions.php	(revision 2792)
+++ bbp-includes/bbp-forum-functions.php	(working copy)
@@ -236,31 +236,61 @@
  * @param int $forum_id Optional. Forum id or topic id. It is checked whether it
  *                       is a topic or a forum. If it's a topic, its parent,
  *                       i.e. the forum is automatically retrieved.
+ * @param bool $total_count Optional. To return the total count or normal
+ *                           count?
  * @uses get_post_field() To check whether the supplied id is a topic
  * @uses bbp_get_topic_forum_id() To get the topic's forum id
  * @uses wpdb::prepare() To prepare the sql statement
  * @uses wpdb::get_col() To execute the query and get the column back
+ * @uses bbp_get_topic_status() To get the topic status
  * @uses update_post_meta() To update the forum's topic count meta
  * @uses apply_filters() Calls 'bbp_update_forum_topic_count' with the topic
- *                        count and forum id
+ *                        count, forum id and total count bool
  * @return int Forum topic count
  */
-function bbp_update_forum_topic_count( $forum_id = 0 ) {
+function bbp_update_forum_topic_count( $forum_id = 0, $total_count = true ) {
 	global $wpdb, $bbp;
 
 	$forum_id = bbp_get_forum_id( $forum_id );
 
-	// If it's a reply, then get the parent (topic id)
-	if ( $bbp->topic_id == get_post_field( 'post_type', $forum_id ) )
+	// If it's a topic, then get the parent (forum id)
+	if ( $bbp->topic_id == get_post_field( 'post_type', $forum_id ) ) {
+		$topic_id = $forum_id;
 		$forum_id = bbp_get_topic_forum_id( $forum_id );
+	}
 
-	// Get topics count
-	$topics = count( $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_parent = %d AND post_status = 'publish' AND post_type = '" . $bbp->topic_id . "';", $forum_id ) ) );
+	$topics               = 0;
+	$children_topic_count = 0;
+	$children             = get_posts( array( 'post_parent' => $forum_id, 'post_type' => $bbp->forum_id, 'meta_key' => '_bbp_forum_visibility', 'meta_value' => 'public' ) );
 
+	foreach ( (array) $children as $child ) {
+		$children_topic_count += (int) bbp_get_forum_topic_count( $child->ID );
+	}
+
+	// Don't count topics if the forum is a category
+	if ( !bbp_is_forum_category( $forum_id ) ) {
+
+		if ( empty( $topic_id ) || !$topics = (int) get_post_meta( $forum_id, '_bbp_forum_topic_count', true ) ) {
+			$topics = (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_parent = %d AND post_status IN ( '" . join( "', '", array( 'publish', $bbp->closed_status_id ) ) . "' ) AND post_type = '" . $bbp->topic_id . "';", $forum_id ) );
+		} else {
+			if ( in_array( bbp_get_topic_status( $topic_id ), array( 'publish', $bbp->closed_status_id ) ) )
+				$topics++;
+			else
+				$topics--;
+		}
+
+	}
+
+	$total_topics = $topics + $children_topic_count;
+
 	// Update the count
-	update_post_meta( $forum_id, '_bbp_forum_topic_count', (int) $topics );
+	update_post_meta( $forum_id, '_bbp_forum_topic_count',       $topics       );
+	update_post_meta( $forum_id, '_bbp_forum_total_topic_count', $total_topics );
 
-	return apply_filters( 'bbp_update_forum_topic_count', (int) $topics, $forum_id );
+	if ( $parent = bbp_get_forum_parent( $forum_id ) )
+		bbp_update_forum_topic_count( $parent );
+
+	return apply_filters( 'bbp_update_forum_topic_count', empty( $total_count ) ? $topics : $total_topics, $forum_id, $total_count );
 }
 
 /**
@@ -270,37 +300,71 @@
  *
  * @since bbPress (r2464)
  *
- * @param int $forum_id Optional. Forum id or reply id. It is checked whether it
- *                       is a reply or a forum. If it's a reply, its forum is
- *                       automatically retrieved.
+ * @param int $forum_id Optional. Forum id or topic id reply id. It is checked
+ *                       whether it is a reply or a topic or a forum and the
+ *                       forum id is automatically retrieved.
+ * @param bool $total_count Optional. To return the total count or normal
+ *                           count?
  * @uses get_post_field() To check whether the supplied id is a reply
- * @uses bbp_get_reply_topic_id() To get the reply's topic id
+ * @uses bbp_get_reply_forum_id() To get the reply's forum id
  * @uses bbp_get_topic_forum_id() To get the topic's forum id
  * @uses wpdb::prepare() To prepare the sql statement
  * @uses wpdb::get_col() To execute the query and get the column back
+ * @uses wpdb::get_var() To execute the query and get the var back
+ * @uses bbp_get_reply_status() To get the reply status
  * @uses update_post_meta() To update the forum's reply count meta
  * @uses apply_filters() Calls 'bbp_update_forum_reply_count' with the reply
- *                        count and forum id
+ *                        count, forum id and total count bool
  * @return int Forum reply count
  */
-function bbp_update_forum_reply_count( $forum_id = 0 ) {
+function bbp_update_forum_reply_count( $forum_id = 0, $total_count = true ) {
 	global $wpdb, $bbp;
 
 	$forum_id = bbp_get_forum_id( $forum_id );
 
-	// If it's a reply, then get the parent (topic id)
+	// If it's a reply, then get the grandparent (forum id)
 	if ( $bbp->reply_id == get_post_field( 'post_type', $forum_id ) ) {
-		$topic_id = bbp_get_reply_topic_id( $forum_id );
-		$forum_id = bbp_get_topic_forum_id( $topic_id );
+		$reply_id = $forum_id;
+		$forum_id = bbp_get_reply_forum_id( $forum_id );
 	}
 
-	// There should always be at least 1 voice
-	$replies = count( $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_parent = %d AND post_status = 'publish' AND post_type = '" . $bbp->reply_id . "';", $forum_id ) ) );
+	// If it's a topic, then get the parent (forum id)
+	if ( $bbp->topic_id == get_post_field( 'post_type', $forum_id ) )
+		$forum_id = bbp_get_topic_forum_id( $forum_id );
 
+	$replies              = 0;
+	$children_reply_count = 0;
+	$children             = get_posts( array( 'post_parent' => $forum_id, 'post_type' => $bbp->forum_id, 'meta_key' => '_bbp_forum_visibility', 'meta_value' => 'public' ) );
+
+	foreach ( (array) $children as $child ) {
+		$children_reply_count += (int) bbp_get_forum_reply_count( $child->ID );
+	}
+
+	// Don't count replies if the forum is a category
+	if ( !bbp_is_forum_category( $forum_id ) ) {
+
+		if ( empty( $reply_id ) || !$replies = (int) get_post_meta( $forum_id, '_bbp_forum_reply_count', true ) ) {
+			$topics  = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_parent = %d AND post_status = 'publish' AND post_type = '" . $bbp->topic_id . "';", $forum_id ) );
+			$replies = (int) !empty( $topics ) ? $wpdb->get_var( "SELECT COUNT(ID) FROM {$wpdb->posts} WHERE post_parent IN ( " . join( ',', $topics ) . " ) AND post_status = 'publish' AND post_type = '" . $bbp->reply_id . "';" ) : 0;
+		} else {
+			if ( 'publish' == bbp_get_reply_status( $reply_id ) )
+				$replies++;
+			else
+				$replies--;
+		}
+
+	}
+
+	$total_replies = $replies + $children_reply_count;
+
 	// Update the count
-	update_post_meta( $forum_id, '_bbp_forum_reply_count', (int) $replies );
+	update_post_meta( $forum_id, '_bbp_forum_reply_count',       $replies       );
+	update_post_meta( $forum_id, '_bbp_forum_total_reply_count', $total_replies );
 
-	return apply_filters( 'bbp_update_forum_reply_count', (int) $replies, $forum_id );
+	if ( $parent = bbp_get_forum_parent( $forum_id ) )
+		bbp_update_forum_reply_count( $parent );
+
+	return apply_filters( 'bbp_update_forum_reply_count', empty( $total_count ) ? $replies : $total_replies, $forum_id, $total_count );
 }
 
 /**
Index: bbp-includes/bbp-forum-template.php
===================================================================
--- bbp-includes/bbp-forum-template.php	(revision 2792)
+++ bbp-includes/bbp-forum-template.php	(working copy)
@@ -40,10 +40,9 @@
 	$r = wp_parse_args( $args, $default );
 
 	// Don't show private forums to normal users
-	if ( !current_user_can( 'read_private_forums' ) && empty( $r['meta_key'] ) && empty( $r['meta_value'] ) && empty( $r['meta_compare'] ) ) {
-		$r['meta_key']     = '_bbp_forum_visibility';
-		$r['meta_value']   = 'public';
-		$r['meta_compare'] = '==';
+	if ( !current_user_can( 'read_private_forums' ) && empty( $r['meta_key'] ) && empty( $r['meta_value'] ) ) {
+		$r['meta_key']   = '_bbp_forum_visibility';
+		$r['meta_value'] = 'public';
 	}
 
 	$bbp->forum_query = new WP_Query( $r );
@@ -397,10 +396,9 @@
 	$r['post_parent'] = bbp_get_forum_id( $r['post_parent'] );
 
 	// Don't show private forums to normal users
-	if ( !current_user_can( 'read_private_forums' ) && empty( $r['meta_key'] ) && empty( $r['meta_value'] ) && empty( $r['meta_compare'] ) ) {
-		$r['meta_key']     = '_bbp_forum_visibility';
-		$r['meta_value']   = 'public';
-		$r['meta_compare'] = '==';
+	if ( !current_user_can( 'read_private_forums' ) && empty( $r['meta_key'] ) && empty( $r['meta_value'] ) ) {
+		$r['meta_key']   = '_bbp_forum_visibility';
+		$r['meta_value'] = 'public';
 	}
 
 	// No forum passed
@@ -467,8 +465,8 @@
 			if ( !empty( $show_topic_count ) && !bbp_is_forum_category( $sub_forum->ID ) )
 				$topic_count = ' (' . bbp_get_forum_topic_count( $sub_forum->ID ) . ')';
 
-			//if ( !empty( $show_reply_count ) && !bbp_is_forum_category( $sub_forum->ID ) )
-			//	$reply_count = ' (' . bbp_get_forum_reply_count( $sub_forum->ID ) . ')';
+			if ( !empty( $show_reply_count ) && !bbp_is_forum_category( $sub_forum->ID ) )
+				$reply_count = ' (' . bbp_get_forum_reply_count( $sub_forum->ID ) . ')';
 
 			$output .= $link_before . '<a href="' . $permalink . '" class="bbp-forum-link">' . $title . $topic_count . $reply_count . '</a>' . $show_sep . $link_after;
 		}
@@ -866,9 +864,10 @@
  * @since bbPress (r2464)
  *
  * @param int $forum_id Optional. Forum id
+ * @param bool $total_count Optional. To get the total count or normal count?
  * @uses bbp_get_forum_topic_count() To get the forum topic count
  */
-function bbp_forum_topic_count( $forum_id = 0 ) {
+function bbp_forum_topic_count( $forum_id = 0, $total_count = true ) {
 	echo bbp_get_forum_topic_count( $forum_id );
 }
 	/**
@@ -877,6 +876,8 @@
 	 * @since bbPress (r2464)
 	 *
 	 * @param int $forum_id Optional. Forum id
+	 * @param bool $total_count Optional. To get the total count or normal
+	 *                           count?
 	 * @uses bbp_get_forum_id() To get the forum id
 	 * @uses get_post_meta() To get the forum topic count
 	 * @uses bbp_update_forum_topic_count() To update the topic count if
@@ -885,12 +886,12 @@
 	 *                        topic count and forum id
 	 * @return int Forum topic count
 	 */
-	function bbp_get_forum_topic_count( $forum_id = 0 ) {
+	function bbp_get_forum_topic_count( $forum_id = 0, $total_count = true ) {
 		$forum_id = bbp_get_forum_id( $forum_id );
-		$topics   = get_post_meta( $forum_id, '_bbp_forum_topic_count', true );
+		$topics  = get_post_meta( $forum_id, empty( $total_count ) ? '_bbp_forum_topic_count' : '_bbp_forum_total_topic_count', true );
 
 		if ( '' === $topics )
-			$topics = bbp_update_forum_topic_count( $forum_id );
+			$topics = bbp_update_forum_topic_count( $forum_id, $total_count );
 
 		return apply_filters( 'bbp_get_forum_topic_count', (int) $topics, $forum_id );
 	}
@@ -901,10 +902,11 @@
  * @since bbPress (r2464)
  *
  * @param int $forum_id Optional. Forum id
+ * @param bool $total_count Optional. To get the total count or normal count?
  * @uses bbp_get_forum_reply_count() To get the forum reply count
  */
-function bbp_forum_reply_count( $forum_id = 0 ) {
-	echo bbp_get_forum_reply_count( $forum_id );
+function bbp_forum_reply_count( $forum_id = 0, $total_count = true ) {
+	echo bbp_get_forum_reply_count( $forum_id, $total_count );
 }
 	/**
 	 * Return total post count of a forum
@@ -912,6 +914,8 @@
 	 * @since bbPress (r2464)
 	 *
 	 * @param int $forum_id Optional. Forum id
+	 * @param bool $total_count Optional. To get the total count or normal
+	 *                           count?
 	 * @uses bbp_get_forum_id() To get the forum id
 	 * @uses get_post_meta() To get the forum reply count
 	 * @uses bbp_update_forum_reply_count() To update the reply count if
@@ -920,12 +924,12 @@
 	 *                        reply count and forum id
 	 * @return int Forum reply count
 	 */
-	function bbp_get_forum_reply_count( $forum_id = 0 ) {
+	function bbp_get_forum_reply_count( $forum_id = 0, $total_count = true ) {
 		$forum_id = bbp_get_forum_id( $forum_id );
-		$replies  = get_post_meta( $forum_id, '_bbp_forum_reply_count', true );
+		$replies  = get_post_meta( $forum_id, empty( $total_count ) ? '_bbp_forum_reply_count' : '_bbp_forum_total_reply_count', true );
 
 		if ( '' === $replies )
-			$replies = bbp_update_forum_reply_count( $forum_id );
+			$replies = bbp_update_forum_reply_count( $forum_id, $total_count );
 
 		return apply_filters( 'bbp_get_forum_reply_count', (int) $replies, $forum_id );
 	}
Index: bbp-includes/bbp-hooks.php
===================================================================
--- bbp-includes/bbp-hooks.php	(revision 2792)
+++ bbp-includes/bbp-hooks.php	(working copy)
@@ -152,7 +152,7 @@
 add_action( 'untrashed_post',      'bbp_update_forum_reply_count' );
 add_action( 'deleted_post',        'bbp_update_forum_reply_count' );
 add_action( 'bbp_new_reply',       'bbp_update_forum_reply_count' );
-add_action( 'bbp_edit_relpy',      'bbp_update_forum_reply_count' );
+add_action( 'bbp_edit_topic',      'bbp_update_forum_reply_count' );
 add_action( 'bbp_move_topic',      'bbp_update_forum_reply_count' );
 add_action( 'bbp_spammed_reply',   'bbp_update_forum_reply_count' );
 add_action( 'bbp_unspammed_reply', 'bbp_update_forum_reply_count' );
Index: bbp-includes/bbp-reply-template.php
===================================================================
--- bbp-includes/bbp-reply-template.php	(revision 2792)
+++ bbp-includes/bbp-reply-template.php	(working copy)
@@ -489,7 +489,7 @@
 			$author = bbp_get_reply_author_link( array( 'link_text' => bbp_get_reply_author( $revision->ID ), 'reply_id' => $revision->ID ) );
 			$since  = bbp_get_time_since( bbp_convert_date( $revision->post_modified ) );
 
-			$r .= "\t" . '<li id="bbp-reply-revision-log-' . $reply_id . '-item" class="bbp-reply-revision-log-item">' . "\n";
+			$r .= "\t" . '<li id="bbp-reply-revision-log-' . $reply_id . '-item-' . $revision->ID . '" class="bbp-reply-revision-log-item">' . "\n";
 				$r .= "\t\t" . sprintf( __( empty( $reason ) ? 'This reply was modified %1$s ago by %2$s.' : 'This reply was modified %1$s ago by %2$s. Reason: %3$s', 'bbpress' ), $since, $author, $reason ) . "\n";
 			$r .= "\t" . '</li>' . "\n";
 
Index: bbp-includes/bbp-topic-functions.php
===================================================================
--- bbp-includes/bbp-topic-functions.php	(revision 2792)
+++ bbp-includes/bbp-topic-functions.php	(working copy)
@@ -589,11 +589,11 @@
 
 	// Forum Topic Counts
 	bbp_update_forum_topic_count( $source_topic_forum_id );
-	bbp_update_forum_topic_count( $destination_topic_id  );
+	// bbp_update_forum_topic_count( $destination_topic_id  );
 
 	// Forum Reply Counts
 	bbp_update_forum_reply_count( $source_topic_forum_id );
-	bbp_update_forum_reply_count( $destination_topic_id  );
+	// bbp_update_forum_reply_count( $destination_topic_id  );
 
 	// Forum Voice Counts
 	bbp_update_forum_voice_count( $source_topic_forum_id );
@@ -807,11 +807,11 @@
 function bbp_split_topic_count( $from_reply_id, $source_topic_id, $destination_topic_id ) {
 
 	// Forum Topic Counts
-	bbp_update_forum_topic_count( $source_topic_id      );
+	// bbp_update_forum_topic_count( $source_topic_id      );
 	bbp_update_forum_topic_count( $destination_topic_id );
 
 	// Forum Reply Counts
-	bbp_update_forum_reply_count( $source_topic_id      );
+	// bbp_update_forum_reply_count( $source_topic_id      );
 	bbp_update_forum_reply_count( $destination_topic_id );
 
 	// Forum Voice Counts
Index: bbp-includes/bbp-topic-template.php
===================================================================
--- bbp-includes/bbp-topic-template.php	(revision 2792)
+++ bbp-includes/bbp-topic-template.php	(working copy)
@@ -525,7 +525,7 @@
 			$author = bbp_get_topic_author_link( array( 'link_text' => bbp_get_topic_author( $revision->ID ), 'topic_id' => $revision->ID ) );
 			$since  = bbp_get_time_since( bbp_convert_date( $revision->post_modified ) );
 
-			$r .= "\t" . '<li id="bbp-topic-revision-log-' . $topic_id . '-item" class="bbp-topic-revision-log-item">' . "\n";
+			$r .= "\t" . '<li id="bbp-topic-revision-log-' . $topic_id . '-item-' . $revision->ID . '" class="bbp-topic-revision-log-item">' . "\n";
 			$r .= "\t\t" . sprintf( __( empty( $reason ) ? 'This topic was modified %1$s ago by %2$s.' : 'This topic was modified %1$s ago by %2$s. Reason: %3$s', 'bbpress' ), $since, $author, $reason ) . "\n";
 			$r .= "\t" . '</li>' . "\n";
 
Index: bbp-themes/bbp-twentyten/css/bbpress.css
===================================================================
--- bbp-themes/bbp-twentyten/css/bbpress.css	(revision 2792)
+++ bbp-themes/bbp-twentyten/css/bbpress.css	(working copy)
@@ -339,7 +339,7 @@
 /* =Stickies
 -------------------------------------------------------------- */
 
-tr.super-sticky td,
+.bbp-topics-front tr.super-sticky td,
 .bbp-forum-info tr.sticky td {
 	background-color: #ffffe0 !important;
 	font-size: 1.1em;
