This is a very common question, and the answer can easily be found on google.
Basically it will look something like this:
str = "select Count(*) a from Mastertable where CaseStatus=@parmCaseStatus"
cmd = New SqlCommand(str, cn)
cmd.Parameters.Add(New SqlParamater("@parmCaseStatus", temp))
Then, instead of a reader you can use the cmd.ExecuteScalar like Kuthuparakkal suggested in the other solution. like this
Dim strResult as String = cmd.ExecuteScalar()