changed to use the hashtbl size instead of var_count (depricated).