Is there any way to limit the quantity a customer can order within a product??

Therefore, if the limit on Category A is 10, they could order 2 x Product A.1 and 4 x Product A.2 and 4 X Product A.3 but cannot order any more items within Category A.

Thoughts?