how to count true bools in array c# code example Example: c# bool list count true return list.Count(x => x)