Ajaxly product items count

Add this code into functions.php

add_filter( ‘woocommerce_add_to_cart_fragments’, ‘custom_cart_count_fragments’, 10, 1 );
function custom_cart_count_fragments( $fragments ) {
$fragments[‘div.header-cart-count’] = ‘<div class=”header-cart-count”>’ . WC()->cart->get_cart_contents_count() . ‘</div>’;
return $fragments;
}

And place this HTML code where you want to display products items.

<div class=”header-cart-count”><?php echo WC()->cart->get_cart_contents_count(); ?></div>