This code contains an external project that demonstrates maintaining a download count for files hosted in the VPP using the DynamicDataStore as the persistence mechanism.
A full walkthrough is available here
http://www.markeverard.com/blog/2010/09/15/using-the-dynamicdatastore-to-count-file-downloads/