FOR EACH oFile IN This.Files DO CASE CASE oFile.Type = "K" nForms = nForms + 1 CASE oFile.Type = "V" nClassLibs = nClassLibs + 1 ... ENDFORCounting lines of code is a little tougher because of comments, but you can do it. Check out the source code for the paper Software Maintenance at http://www.tedroche.com/papers.php