Added lex_smaller_count to wt_int.hpp and fixed bug in rank and lex_count