方法一
Dim n As Integer = DataTables("表A").Compute("Count([_Identify])", "是否加权 = True")
方法二
Dim n As integer
For each dr As DataRow In DataTables("表A").DataRows
If dr("是否加权") = True Then
n = n + 1
End If
Next