There's a lot of theory behind SLOC.
I once had a work-assignment to roughly compare the value/weight of the several software packages we have, written in several languages (C, C++, C#, Cobol, Delphi, Java, Modula2, VB is in alphabetic order what I can remember now).
I searched for tools then that could generate some useful statistics based on SLOC, and ended up testing a few and finally settling on CodeCount
from USC, in the 2006.05 version back then (Gee was it that long ago
The major reason for selecting CodeCount was that it then gave reasonable and
somewhat comparable counts for most of the languages I had to report on (Delphi and Modula2 aren't supported but I think I used another counter that supports Delphi and would eat Modula2, but I can't recall which one) , and all are based on the same measurement types, and from one development team.
I not sure you have the ambition to reach that kind of level or approach, and I'm not really interested in re-doing my tests from back then, but in addition to the Wikipedia article skwire referred to, it could be an interesting article/site for you to read.
Don't have the results of that report at hand, but it must be somewhere in my mail archive. I do recall there was quite a difference between the languages on P-Sloc and L-Sloc ratings (they're both calculated), but I can't even recall any figures just now.
I'll give this one a swing on some of my current projects