Count lines
-l counts lines alone. With more than 1 file, wc adds a total:
$ wc -l main.go util.go
120 main.go
45 util.go
165 total
Count the files of a project
Git lists the files that it tracks, and xargs passes them to wc:
git ls-files | xargs wc -l
Warning
wc counts newline characters, so it misses a last line without one: printf 'a\nb' | wc -l prints 1.