Add an incremental error counter

If you have a task doing many iterations, some of which may fail but still allow the task to continue, you can track the number that have failed.

@Sirupsen 
Good catch :)