feat(langchain): support custom token_counter in ContextEditingMiddleware (#39754)