This program simply counts the number of lines in standard input and writes the result to standard output. Assumes UNIX-style line terminators. Requires lots of memory as written.