Index: src/includes/forums/functions.php
===================================================================
--- src/includes/forums/functions.php	(revision 5972)
+++ src/includes/forums/functions.php	(working copy)
@@ -1649,22 +1649,31 @@
 
 	// Don't count replies if the forum is a category
 	$reply_count = 0;
-	$topic_ids   = bbp_forum_query_topic_ids( $forum_id );
-	if ( ! empty( $topic_ids ) ) {
-		$query = new WP_Query( array(
-			'fields'          => 'ids',
-			'post_parent__in' => $topic_ids,
-			'post_status'     => bbp_get_public_status_id(),
-			'post_type'       => bbp_get_reply_post_type(),
+	$all_topic_ids   = bbp_forum_query_topic_ids( $forum_id );
 
-			// Maybe change these later
-			'posts_per_page'         => -1,
-			'update_post_term_cache' => false,
-			'update_post_meta_cache' => false,
-			'ignore_sticky_posts'    => true,
-		) );
-		$reply_count = ! empty( $query->posts ) ? count( $query->posts ) : 0;
-		unset( $query );
+	$topic_ids_chunks = array_chunk( $all_topic_ids, 1000 );
+
+
+	foreach( $topic_ids_chunks as $topic_ids ){
+
+		$chunk_reply_count = 0;
+		if ( ! empty( $topic_ids ) ) {
+			$query = new WP_Query( array(
+				'fields'          => 'ids',
+				'post_parent__in' => $topic_ids,
+				'post_status'     => bbp_get_public_status_id(),
+				'post_type'       => bbp_get_reply_post_type(),
+	
+				// Maybe change these later
+				'posts_per_page'         => -1,
+				'update_post_term_cache' => false,
+				'update_post_meta_cache' => false,
+				'ignore_sticky_posts'    => true,
+			) );
+			$chunk_reply_count = ! empty( $query->posts ) ? count( $query->posts ) : 0;
+			$reply_count += $chunk_reply_count;
+			unset( $query );
+		}
 	}
 
 	// Calculate total replies in this forum
@@ -2069,7 +2078,6 @@
  */
 function bbp_forum_query_topic_ids( $forum_id ) {
    	$topic_ids = bbp_get_public_child_ids( $forum_id, bbp_get_topic_post_type() );
-
 	return (array) apply_filters( 'bbp_forum_query_topic_ids', $topic_ids, $forum_id );
 }
 
@@ -2111,6 +2119,7 @@
 
 	// Validate forum
 	$forum_id = bbp_get_forum_id( $forum_id );
+	$last_reply_id = 0;
 
 	// Get topic ID's if none were passed
 	if ( empty( $topic_ids ) ) {
@@ -2117,22 +2126,31 @@
 		$topic_ids = bbp_forum_query_topic_ids( $forum_id );
 	}
 
-	$query = new WP_Query( array(
-		'fields'          => 'ids',
-		'post_parent__in' => $topic_ids,
-		'post_status'     => bbp_get_public_status_id(),
-		'post_type'       => bbp_get_reply_post_type(),
+	$topic_ids_chunks = ( empty( array_chunk( $topic_ids, 1000 ) ) ) ? array( 0 => array() ) : array_chunk( $topic_ids, 1000 ); // this needs an empty array if it's empty
 
-		// Maybe change these later
-		'posts_per_page'         => 1,
-		'update_post_term_cache' => false,
-		'update_post_meta_cache' => false,
-		'ignore_sticky_posts'    => true,
-	) );
-	$reply_id = array_shift( $query->posts );
-	unset( $query );
 
-	return (int) apply_filters( 'bbp_forum_query_last_reply_id', $reply_id, $forum_id );
+	foreach( $topic_ids_chunks as $topic_ids ){
+
+		$query = new WP_Query( array(
+			'fields'          => 'ids',
+			'post_parent__in' => $topic_ids,
+			'post_status'     => bbp_get_public_status_id(),
+			'post_type'       => bbp_get_reply_post_type(),
+	
+			// Maybe change these later
+			'posts_per_page'         => 1,
+			'update_post_term_cache' => false,
+			'update_post_meta_cache' => false,
+			'ignore_sticky_posts'    => true,
+		) );
+		$chunk_reply_id = array_shift( $query->posts );
+		$last_reply_id = ( $chunk_reply_id > $last_reply_id ) ? $chunk_reply_id : $last_reply_id; // @todo fix ID / date conflation
+
+		unset( $query );
+	}
+
+
+	return (int) apply_filters( 'bbp_forum_query_last_reply_id', $last_reply_id, $forum_id );
 }
 
 /** Listeners *****************************************************************/
