The following code is test and worked
Class TItem
Public Property Sex As Integer
Public Property Grade As Integer
Public Property studentID As Long
End Class
Sub Main()
Dim Items = { _
New TItem With {.Sex = 1, .Grade = 1}, _
New TItem With {.Sex = 1, .Grade = 1}, _
New TItem With {.Sex = 0, .Grade = 1}, _
New TItem With {.Sex = 0, .Grade = 1} _
}
Dim ItemsList As New List(Of TItem)(Items)
Dim n = Aggregate Item As TItem In ItemsList Where Item.Sex = 1 And Item.Grade = 1 Into Count()
MsgBox(n)
End Sub