arnoldxx, looks like just a minor adjustment will get your code to work. DataSet is a Type and therefore not the actual target you are filling with the adapter.
Dim count = DataSet.Tables(0).Rows.Count
Should be...
Dim count = ds.Tables(0).Rows.Count