Add a cookie to your script to do an action after running a script x amount of times.