This was inspired by another line-counting utility already here on MudBytes, but I think it's a bit more accurate. I wrote it because I noticed the other one didn't count single-line //comments correctly or even get the right total amount of lines. I've tested it in Cygwin and on a server running Slackware 10.2.0 and GCC 3.3.6, it should probably be fine anywhere.
Edit: Fixed an embarrassing typo in the header.
Edit: Turns out I'd uploaded the wrong file entirely. The ACCURATE one was actually within my MUD's /utils directory.