Membership duration depending on conditions?
Set up the membership normally with a duration of i.e. 6 month/1 year. 
Use the extension Summary Fields to report back the number of events visited per user. 
Implement the Rule (on participant status change &gt;&gt;&gt; attended) in CiviRules and change membership/subscription status to &quot;expired&quot;.