PowerShell では、

$matches = 1..30 | Select-String "1" -AllMatches

$matches.Matches.Count

#=> 13