The iostat command gets the IO statistics from configuration snapshots and can compare those snapshots to select some data to display.
The main algorithm is:
newss = acquire_snapshot(...);
do {
print_statistics_data(newss);
if (only_asked_iteration == 1)
continue;
oldss = newss;
newss = acquire_snapshot(...);
report_changes_between(oldss, newss);
} while (--iteration);
So if we ask for a specific number of iterations to run - "count" > 0 in:
iostat [interval [count]]
iostat will display the requested number of lines but after printing out the last line, will not exit immediately, but will take the time to get an additional snapshot and compare it with the previous one.
-> The only information this snapshot may provide are about possible configuration (and/or state) change messages.
A more logical behaviour would be to exit immediately after the last requested line is printed out without waiting for more - the same way as when we only ask for one data line.
And it also helps to get better interactive performance for this command.