Quote:
But that also counts the ';' in comments laugh

Code:
import re
print re.sub("//.*", "", re.sub(re.compile("/\*.*\*/", re.DOTALL), "", open("main.c", "r").read())).count(";")

still one line (without the import) but a bit nasty to read. :p