Add restart_count

Add restart_count to options to track how much a task gets restarted and
if it goes past 10, then it will stop restarting.