wc excluaire. et .. répertoires et lignes vides ou commentées
# Although, that's language dependent... Examples can be found below...
cat foo.c | sed '/^\s*$/d' | wc -l
And if you consider comments blank lines:
cat foo.pl | sed '/^\s*#/d;/^\s*$/d' | wc -l
Lazy Lizard