Limiting Pageviews/Paywall Plugin

I think this would be best as an add-on to membership, but it would be nice to have the ability to limit pageviews to create a sort of paywall.

Similar to how the NYTimes limits people to 20 free articles/month, I’d be really interested in similar functionality for membership. Even on free sites, it could encourage registration. For example, unlogged visitors (not including search engines) can view 10 pages before required to log in, free users can view 20 pages and paid members can have unlimited views.