# Basic syntax:
sum(1 for item in your_list if item == "some_condition")
# This counts the items in your_list for which item == "some_condition"
# is true. Of course, this can be changed to any conditional statement
num = [1,2,3,6,4,2]
sub = 2
print(num.count(sub))
num = [1, 2, 3, 4, 3, 2, 1, 3]
three_count = num.count(3)
print(three_count)
#output = 3