diff -durN xemacs-orig/src/callint.c xemacs/src/callint.c
--- xemacs-orig/src/callint.c	Sat Jan 19 11:19:30 2002
+++ xemacs/src/callint.c	Sat Jan 19 11:26:37 2002
@@ -37,7 +37,7 @@
 #include "insdel.h"
 #include "window.h"
 
-extern int num_input_chars;
+extern Charcount Vnum_input_chars;
 
 Lisp_Object Vcurrent_prefix_arg;
 Lisp_Object Qcall_interactively;
@@ -328,7 +328,7 @@
   if (!STRINGP (specs) && prompt_data == 0)
     {
       struct gcpro gcpro1, gcpro2, gcpro3;
-      int i = num_input_chars;
+      Charcount i = Vnum_input_chars;
       Lisp_Object input = specs;
 
       GCPRO3 (function, specs, input);
@@ -339,7 +339,7 @@
 	  UNGCPRO;
 	  return specs;
 	}
-      if (!NILP (record_flag) || i != num_input_chars)
+      if (!NILP (record_flag) || i != Vnum_input_chars)
 	{
 	  /* We should record this command on the command history.  */
 	  /* #### The following is too specific; should have general
diff -durN xemacs-orig/src/event-stream.c xemacs/src/event-stream.c
--- xemacs-orig/src/event-stream.c	Sat Jan 19 11:11:39 2002
+++ xemacs/src/event-stream.c	Sat Jan 19 11:26:37 2002
@@ -184,6 +184,9 @@
    session.  */
 int Vnum_input_keys;
 
+/* the number of keyboard characters read.  callint.c wants this. */
+Charcount Vnum_input_chars;
+
 /* The value of point when the last command was executed.  */
 Bufpos last_point_position;
 
@@ -1928,9 +1931,6 @@
   return in_single_console;
 }
 
-/* the number of keyboard characters read.  callint.c wants this. */
-Charcount num_input_chars;
-
 static void
 next_event_internal (Lisp_Object target_event, int allow_queued)
 {
@@ -2221,7 +2221,7 @@
     }
 
   maybe_do_auto_save ();
-  num_input_chars++;
+  Vnum_input_chars++;
  STORE_AND_EXECUTE_KEY:
   if (store_this_key)
     {
@@ -4539,7 +4539,6 @@
 {
   recent_keys_ring_index = 0;
   recent_keys_ring_size = 100;
-  num_input_chars = 0;
   Vtimeout_free_list = make_lcrecord_list (sizeof (Lisp_Timeout),
 					   &lrecord_timeout);
   staticpro_nodump (&Vtimeout_free_list);
@@ -4547,6 +4546,8 @@
     Blocktype_new (struct low_level_timeout_blocktype);
   something_happened = 0;
   recursive_sit_for = Qnil;
+  Vnum_input_keys = 0;
+  Vnum_input_chars = 0;
 }
 
 void
@@ -4731,9 +4732,14 @@
   DEFVAR_INT ("num-input-keys", &Vnum_input_keys /*
 Number of complete key sequences processed so far in this XEmacs session.
 */ );
-Vnum_input_keys = 0;
+  Vnum_input_keys = 0;
 
-  DEFVAR_LISP ("help-char", &Vhelp_char /*
+  DEFVAR_INT ("num-input-chars", &Vnum_input_chars /*
+Number of keystrokes processed so far in this XEmacs session.
+*/ );
+  Vnum_input_chars = 0;
+
+ DEFVAR_LISP ("help-char", &Vhelp_char /*
 Character to recognize as meaning Help.
 When it is read, do `(eval help-form)', and display result if it's a string.
 If the value of `help-form' is nil, this char can be read normally.