public function recount( $args ) {
		foreach ( $args as $id ) {
			wp_update_comment_count( $id );
			$post = get_post( $id );
			if ( $post ) {
				WP_CLI::log( "Updated post {$post->ID} comment count to {$post->comment_count}." );
			} else {
				WP_CLI::warning( "Post {$post->ID} doesn't exist." );
			}
		}
	}
public function recount( $args ) {
		foreach ( $args as $id ) {
			wp_update_comment_count( $id );
			$post = get_post( $id );
			if ( $post ) {
				WP_CLI::log( "Updated post {$post->ID} comment count to {$post->comment_count}." );
			} else {
				WP_CLI::warning( "Post {$post->ID} doesn't exist." );
			}
		}
	}
public function recount ( $ args ) { foreach ( $ args as $ id ) { wp_update_comment_count ( $ id ) ; $ post = get_post ( $ id ) ; if ( $ post ) { WP_CLI :: log ( "Updated post {$post->ID} comment count to {$post->comment_count}." ) ; } else { WP_CLI :: warning ( "Post {$post->ID} doesn't exist." ) ; } } }
Recalculates the comment_count value for one or more posts.

## OPTIONS

<id>...
: IDs for one or more posts to update.

## EXAMPLES

# Recount comment for the post.
$ wp comment recount 123
Updated post 123 comment count to 67.
Recalculates the comment_count value for one or more posts .