Windows PowerShell Get File Count: (Get-ChildItem "C:\[Code Location]" -force -recurse).Count
To get a line count first navigate to the directory in question via: cd [dir]
Windows PowerShell Get Line Count (Add file extensions as necessary): (dir -include *.vb, *.cs, *.xsd, *.mdf, *.xml, *.xslt, *.cd, *.js, *.vbs, *.wsf, *.config, *.resx, *.ico, *.rpt, *.txt, *.apsx, *.asax, *.ashx, *.htm, *.html, *.css, *.sitemap, *.skin, *.browser, *.disco, *.ascx -recurse | select-string .).Count
Windows PowerShell is a powerful tool in any programmer's arsenal. The next time you have a task to perform and are looking for a tool to do it with give the task name combined with Windows PowerShell a try in google.
Here are some great Windows PowerShell resources:
Scripting with Windows PowerShell
Automating IT Tasks with Windows PowerShell Overview
Windows PowerShell SDK