for needle in haystack:
count += 1
The reason this doesn't work is that "for x in y" is iterating over values in y, and /placing/ them into x; it does not read from x. So in your code example, you are iterating over haystack (which, in Python, means looping through each letter), and then placing the value (each letter) into needle. Which is not what you want.
There's no built-in iterator to give you what you want -- an iterator of the occurrences of another string. haystack.count(needle) will give you the desired answer; other than that, you could also use haystack.find to find an occurrence starting at a given point, and keep track of how far you are in the string yourself:
index = haystack.find(needle)
while index >= 0:
count += 1
index = haystack.find(needle, index + 1)
Note that this will give a different answer than haystack.count: haystack.count will never count a letter twice, whereas the above will. So "aaaaaa".count("aaa") will return 2 (finding "aaaaaa" and "aaaaaa"), but the above code would return 4, because it would find "aaaaaa", "aaaaaa", "aaaaaa", and "aaaaaa".