Changed logic of total token count.