Added input token count estimation