Hi Maciej Los,
I've solved it! thanks for your help. I use this code instead of using function.
Private Sub btn_login_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_login.Click
Dim con As New MySqlConnection(cnString)
con.Open()
Dim cmd As New MySqlCommand("Select Count(*) from tbl_account where shd_agent = 'JONATHAN' ", con)
Dim i As Integer = cmd.ExecuteScalar()
cmd = Nothing
con.Close()
txt_count.Text = i
End Sub