Here's some quick-and-dirty perl to do what you want:
#!/usr/bin/perl
open(I, "<$ARGV[0]") || die "Can't open $ARGV[0]: $!\n";
while (1) {
my $count = 0;
while (<I>) { $count++; }
print scalar(localtime()), ": $count lines\n";
sleep(3);
seek(I, 0, 1); # clear the EOF on I
}
close(I);
Here's the output of it running in one window:
[root@g3 tmp]# perl tt.pl FILE
Thu Dec 9 13:18:38 2010: 0 lines
Thu Dec 9 13:18:41 2010: 0 lines
Thu Dec 9 13:18:44 2010: 0 lines
Thu Dec 9 13:18:47 2010: 0 lines
Thu Dec 9 13:18:50 2010: 0 lines
Thu Dec 9 13:18:53 2010: 1 lines
Thu Dec 9 13:18:56 2010: 0 lines
Thu Dec 9 13:18:59 2010: 1 lines
Thu Dec 9 13:19:02 2010: 0 lines
Thu Dec 9 13:19:05 2010: 0 lines
Thu Dec 9 13:19:08 2010: 0 lines
Thu Dec 9 13:19:11 2010: 0 lines
Thu Dec 9 13:19:14 2010: 0 lines
Thu Dec 9 13:19:17 2010: 0 lines
Thu Dec 9 13:19:20 2010: 100 lines
And here's the commands I ran in another window to generate the output above:
[root@g3 ~]# cd /tmp
[root@g3 tmp]# echo foo > FILE
[root@g3 tmp]# echo foo >> FILE
[root@g3 tmp]# for i in `seq 1 100`
> do
> echo $i >> FILE
> done
[root@g3 tmp]#
Hope that helps...