Html Code (place here it needed)

				
					 <a href="<?php echo esc_url(wc_get_cart_url()); ?>" title="<?php _e('View your shopping cart', 'dpthemes'); ?>"
 class="mini_cart dropdown_link" data-no-instant> <span class="cart_count"><i class="fal fa-shopping-cart"></i>
 <?php echo sprintf ( _n( '%d ', '%d ', WC()-> cart->get_cart_contents_count() ), WC()->cart->
 get_cart_contents_count() ); ?> - <?php echo WC()->cart->get_cart_total(); ?></span>                         </a> 
				
			

Place in your functions.php file or custom function file, this ajax function auto updates cart Icon count and total when Add to cart button is pushed

				
					add_filter( 'woocommerce_add_to_cart_fragments', 'header_add_to_cart_fragment', 30, 1 );
function header_add_to_cart_fragment( $fragments ) {
global $woocommerce;
ob_start(); 
?> 
<a href="<?php echo esc_url(wc_get_cart_url()); ?>" title="<?php _e('View your shopping cart', 'dpthemes')
; ?>" class="mini_cart dropdown_link" data-no-instant> <span class="cart_count">
    <i class="fal fa-shopping-cart"></i> 
<?php echo sprintf(_n('%d item', '%d items', $woocommerce->cart->cart_contents_count, 'dpthemes'),
$woocommerce->cart->cart_contents_count);?> - <?php echo $woocommerce->cart->get_cart_total(); ?></a> 
<?php 
$fragments['a.mini_cart'] = ob_get_clean(); 
return $fragments; 
}