Thank u for posting, sure i am updating my solution,
I have used one hook to customize the topic pagination link. I was the issue with the total number of topic count as per my requirement.
function ntwb_bbpress_custom_pagination( $args ) {
$topic_per_page = bbp_get_topics_per_page();
$ttt = bbp_get_forum_id();
$total_topic = custom_forum_topic_count($ttt); //get your topic count as your requirement[This is my own function]
$total = ( $topic_per_page === $total_topic ) ? 1 : ceil( (int) $total_topic / (int) $topic_per_page );
$args[‘total’] = $total;
return $args;
}
add_filter( ‘bbp_topic_pagination’, ‘ntwb_bbpress_custom_pagination’ );
I got my answer, so no need to reply this topic