Add statistics for task.
closes #216.