I was trolling through the downloads and happen to run across this:
MS IT partnered with Microsoft Research to create a VSTS 2005 extension that counts lines of code and predicts system defects. In the software development environment, insight into the volume of code being produced, and the changes applied to that code, provide measurements of productivity and quality. The Line of Code (LOC) counter provides a flexible and extensible framework for automating the LOC counting process.
While it does works fine against VSTS and TFS 2008 -Unfortunately it doesn't work on Vista Computers.
In playing w/ the utility i noticed a couple of gotchas
1. The Documentation refers to internal Microsoft servers for different versions - ignore this the latest version is on the website
2. After you set the methodology type to one that you have created; you need enable tasks to collect the counter data (see images below)