WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Features

CustomerEffortScoreTracks::get_product_count() private WC 1.0

Get the current published product count.

{} It's a method of the class: CustomerEffortScoreTracks{}

No Hooks.

Return

Int. The current published product count.

Usage

// private - for code of main (parent) class only
$result = $this->get_product_count();

Code of CustomerEffortScoreTracks::get_product_count() WC 5.3.0

<?php
private function get_product_count() {
	$query         = new \WC_Product_Query(
		array(
			'limit'    => 1,
			'paginate' => true,
			'return'   => 'ids',
			'status'   => array( 'publish' ),
		)
	);
	$products      = $query->get_products();
	$product_count = intval( $products->total );

	return $product_count;
}