Can I restrict the number of products of a certain type per transaction?

It is possible to set a rule to specify the number of products of a certain type for each order. When a customer proceeds to the online checkout the contents of their order are checked against the rules and If the rules have not been met a message will be displayed to explain the criteria. Error messages can be re-worded as needed.
WooCommerce Frequently Asked Questions