Dim i as Integer

...
while MyDataReader.Read
i = i + 1
End While