SLOCCount is an easy-to-use tool that counts Source Lines of Code (SLOC). It auto-determines the language(s) (inc. C, C++, Ada, Assembly, shell, COBOL, C#, Fortran, Haskell, Java, LISP/Scheme, Perl, PHP, Python, Ruby, SQL). It also estimates cost & time.
Generates syntax highlighted HTML for almost all (including ASP,Aspect-J,AWK,C++,C#,COBOL,CSS,FreeMarker,Groovy,HTML,INI,Java,JavaScript,JSP,Makefile,Pascal,Perl,PHP,PL-SQL,Properties,Python,RTF,Smalltalk,TeX,VBScript,Velocity,XML,XSL) languages.