Using Powershell:

Example #1: count of lines in all files with extension .cs in current directory and under it

get-childitem . -include *.cs -recurse | get-content | measure-object -line -word -character

Lines                    Words               Characters
-----                    -----               ----------
 689                     1721                    23884

Example #2: count of lines in all files with extension .cs and *.js in current directory and under it

get-childitem . -include *.cs,*.js -recurse | get-content | measure-object -line -word -character

Lines                    Words               Characters
-----                    -----               ----------
64994                   284349                  2605190

NOTE that the performance isn't good in very large projects