Imports System
Imports System.Collections.Generic
Public Class Program
Public Shared Sub Main()
Dim lst = New List(Of Integer)({2, 6, 1, 5, 8, 1, 1, 0, 9, 1 })
Dim count As Integer = 0
For Each item As Integer In lst
If item = 1 Then
count += 1
End If
Next
Console.WriteLine(count)
End Sub
End Class
' run:
'
' 4
'