Just did a quick patch to make lastlog have a -count option
(prints the number of lines lastlog would have printed).
I'm not really sure how you make diffs with cvs (i used cvs diff):
Index: src/fe-text/lastlog.c
===================================================================
RCS file: /home/cvs/irssi/src/fe-text/lastlog.c,v
retrieving revision 1.10
diff -r1.10 lastlog.c
156a157,163
> if(g_hash_table_lookup(optlist, "count") != NULL) {
> printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
> TXT_LASTLOG_COUNT, len);
> g_list_free(list);
> return;
> }
>
208,209c215,216
< /* SYNTAX: LASTLOG [-] [-file <filename>] [-clear] [-<level> -<level...>]
< [-new | -away] [-regexp | -word] [-case]
---
> /* SYNTAX: LASTLOG [-] [-file <filename>] [-clear] [-count]
> [-<level> -<level...>] [-new | -away] [-regexp | -word] [-case]
259c266
< command_set_options("lastlog", "!- force clear -file -window new away wo rd
regexp case");
---
> command_set_options("lastlog", "!- force clear count -file
> -window new a way word regexp case");
Index: src/fe-text/module-formats.c
===================================================================
RCS file: /home/cvs/irssi/src/fe-text/module-formats.c,v
retrieving revision 1.11
diff -r1.11 module-formats.c
28a29
> { "lastlog_count", "{hilight Lastlog}: $0 lines", 1, { 1 }
> },
Index: src/fe-text/module-formats.h
===================================================================
RCS file: /home/cvs/irssi/src/fe-text/module-formats.h,v
retrieving revision 1.10
diff -r1.10 module-formats.h
6a7
> TXT_LASTLOG_COUNT,
--
Success is a journey, not a destination.