WP_COMENT_QUERY Otrzymuj całkowitą liczbę pobieranych komentarzy

$query = array(
    // ... your args here.
    'count'         => false, // 1. Don't set or set to false
    'no_found_rows' => false, // 2. Set to false (default is true)
    'number'        => 5,     // 3. Set to a non-zero value
);

$comment_query = new WP_Comment_Query( $query );

// total for the current results set, e.g. on page 1
$count = count( $comment_query->comments );
// total for all pages, same as when LIMIT is not set
$total = $comment_query->found_comments;
uzii