Added support for printing iteration count.