This snippet will charge additional handling fees if total no. of products in cart exceeds to 10. You can change Qty “10” to suits your application. Simply put this code to your child theme’s functions.php.
This will add additional charges row to Cart Totals Table as given in the below screenshot when Total no. of products in cart exceeds 10.