How to add Advanced Rules for Category Quantity Hide Shipping Method

Just like product-quantity based Advanced Rules, the Hide Shipping Method for WooCommerce plugin lets you apply conditions related to the collective quantity of an entire category. 

Though it works exactly the same, the total quantity of products belonging to the respective category are taken into consideration in such a case, instead of the individual product quantities.

How to add advanced rule for category quantity specific hide rule