November 7, 2019 VB.Net – Count substring occurrences in a string The simplest way Dim text = ".Maui is awesome" Dim count = text.Split("a").Length -1 .Maui