python count occurrences in list of true or false code example Example: python how to count number of true true_count = sum(a_boolean_list)