The for loop runs four iterations, so count gets incremented by one four times. count goes from 0 to 1 to 2 to 3 to 4, then is displayed. The while condition is still true, so the for loop executes again: 5,6,7,8, display.
While condition still true, so for loop goes again: 9, 10, 11, 12, display.
Now the while condition is false and the outer loop ends.
Dim Adapter As New OleDbDataAdapter
Dim Command As New OleDbCommand
Dim xFrom As String = dtpFrom.Value.ToString.Substring(0, dtpFrom.Value.ToString.IndexOf(" "))
Dim xTo As String = dtpTo.Value.ToString.Substring(0, dtpTo.Value.ToString.IndexOf(" "))
sqlQuery = MainQuery ...