Adjusted to new lex_count signature.