Oops, try again. Your function fails on count([4, 'foo', 5, 'foo'],5). It returns 0 when it should return 1.
my if statement clearly states that when num = items that we should add 1 to number so that's what confuses me?
def count(sequence, item): number = 0 for num in sequence: if num == item: number += 1 elif num != item: return 0 print number