I know you can iterate over preferences to find out how many insults you got so far but I think it's easier to just reuse the code thats already there in Java and export the functionality to ash.