Post History
Objectively, the most accurate way would be to actually count the lines. So you would do wc on each file and add them up. This ends up being not a very useful statistic, because it is sensitive to...
Answer
#1: Initial revision
Objectively, the most accurate way would be to actually count the lines. So you would do `wc` on each file and add them up. This ends up being not a very useful statistic, because it is sensitive to many trivial things that people who talk about LoC would rather disregard: Blank lines, lines broken for readability, commented lines, duplicated code, dummy files, non-code files. Usually, what people want to know is something like "how many instructions in this codebase?" because they are trying to understand its complexity, not how many times you pressed the return key. This is probably why `tcount` claims it's more accurate. There's another tool called [SLOCCount](https://dwheeler.com/sloccount/) which is made by a researcher who is an expert on measuring code base complexity. There are many others as well if you search for line counters online.