how to count true values in if statement in python code example Example: python how to count number of true true_count = sum(a_boolean_list)