You can use enumerate() to loop through the generated data stream, then return the last number -- the number of items.
I tried to use itertools.count() with itertools.izip() but no luck. This is the best/shortest answer I've come up with:
#!/usr/bin/python
import itertools
def func():
    for i in 'yummy beer':
        yield i
def icount(ifunc):
    size = -1 # for the case of an empty iterator
    for size, _ in enumerate(ifunc()):
        pass
    return size + 1
print list(func())
print 'icount', icount(func)
# ['y', 'u', 'm', 'm', 'y', ' ', 'b', 'e', 'e', 'r']
# icount 10
Kamil Kisiel's solution is way better:
def count_iterable(i):
    return sum(1 for e in i)