Dim target As String = "ABCDE" Dim temp As String = TextBox1.Text.Replace(target, "") Dim count As Integer = (Len(TextBox1.Text) - Len(temp)) \ Len(target) Label1.Text = count & "個あります。"