How to get product count with respect to categories in WooComerce

You just need to add $cat->count to get the count of all products in that category. Hope this helps you out.

$args = array(
    'number'     => $number,
    'orderby'    => $orderby,
    'order'      => $order,
    'hide_empty' => $hide_empty,
    'include'    => $ids
);

$product_categories = get_terms( 'product_cat', $args );

foreach( $product_categories as $cat )  { 
   echo $cat->name.' ('.$cat->count.')'; 
}