Terminating access to a folder after bandwidth limit reached...Anyway to do it?

I’m sorry for posting here if this isn’t the correct forum to post in, but server-side seemed like the right place.

I’m trying to figure out a way to prevent access to a folder on an Apache server after a certain amount of data has been downloaded from it. My skills with xml, php, etc. are novice at best, and I have no idea how, or if, this can be done. If there’s no way to count bandwidth, then how about simply counting hyperlink requests, and then blocking access via htconfig after a set number of requests?? This is just a guess, though…

I’ve tried searching for an answer, but I can’t seem to find anything about it. It seems like someone must have tried this before.

Thanks so much for any help!
e.s.a.