type /help $lines

from the help file :

$lines(filename)
Returns the total number of lines in the specified text file.

$lines(c:\irc\kicks.txt) returns the total number of lines in c:\irc\kicks.txt