It sometimes helps to look at / think about the code: (taken from Wikipedia)
procedure bubbleSort( A : list of sortable items )
repeat
swapped = false
for i = 1 to length(A) - 1 inclusive do:
// this is the start of an iteration
if A[i-1] > A[i] then
swap( A[i-1], A[i] )
swapped = true
end if
// this is the end of an iteration
end for
until not swapped
end procedure
Based on the above, it should be easy to see that we only count an iteration when we're actually doing a comparison.
So it would be 4 iterations.
As a technicality, you could also talk about iterations in terms of the repeat ... until
loop, which would give you quite different results.
And the 'steps' can certainly be split up into a lot smaller parts.
For ambiguities similar to the above, we tend to stick to big-O notation, which really just gives us a rate of growth of an algorithm's running time.