/* This program counts the number
   of lines in std input */

#include <stdio.h>

main()
{
  int c, numl = 0;
  
  while ( ( c = getchar() ) != EOF )
    if ( c == '\n' )
      numl++;

  printf ("Number of lines: %d\n", numl);
}

