Restricting number of posts in a category for members (membership plugin)

How can I restrict the number of posts that are made by a member?

I have the section set up where I allow them to post to a certain category, but I’d like to be able to restrict the number of posts made in the category, depending on the membership level.

For example, restrict members who sign up to add events (which has its own level) to 10, but restrict those who sign up to add holiday accommodation (a seperate level) to add just 1.