SampleString = "A sample string to use with the InStr function."
Finished = false
Count = 0
Start = 1
While not Finished
Position = InStr(Start, SampleString, "s")
If Position = 0 Then
Finished = true
Else
Start = Position + 1
Count = Count + 1
End If
WEnd
Response.Write Count