(Technical question)- How to limit the number of page views for a specific site under a WPMU instsal


Existing WPMU plugins provide for site limits to be set on space and bandwidth-- as I plan to use a CDN for the images/videos (ie the content that uses up most of space+bandwidth)-- I wish to approach the issue of limiting usage of a single site within a WPMU install in a different way-- by counting the number of page views for that site in a single month.

Kindly let me know exactly what I have to do to count the page views for a site-- is this (access to all pages within a site) stored somewhere? Or is there some way to create a plugin that logs each such page view (or 'hit') to a website?

I have no problem programming the solution- the question is how to count the number of page views for a single site.

Another issue- I would like that site to be automatically suspended once the number of hits reaches a certain level-- for eg if a blog is only allowed 10,000 page views in a month- then after the 10,000th view, when the next viewer attempts to view that blog he should get a generic "Site Suspended because it has reached its usage limits" (or some such) message. What I want to know is, what is the quickest way to display such a message (irrespective of any page being accessed- as long as the max number of page views for that site have been used up and the page being accessed belongs to that site-that page can be a blog post/a marketpress page//a page belonging to any Wordpress module/plugin that is installed on that specific site). I wish to 'suspend' a single site in the easiest manner possible programmatically( I would prefer not to do this manually by logging in as WPMU Superadmin)-- is such functionality already there in ProSites (but used when the space/bandwidth limits of a user are reached)? Please let me know if this is so (as it would be easiest to use such working and tested code- only now it would work to limit number of page views).