WC excluye. y ... Directorios y líneas vacías o comentadas
# 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