You can use Enumerable.Count :
int numTrue = list.Count(cc => cc.trueOrFalse);
Remember to add using system.Linq;
Note that you should not use this method to check whether a sequence of elements contains or not ( list.Count(cc => cc.trueOrFalse) != 0 ). Therefore you should use Enumerable.Any :
bool hasTrue = list.Any(cc => cc.trueOrFalse);
The difference is that Count lists the entire sequence, whereas Any will return true sooner as soon as it finds one element that passes the test predicate.
source share