Implement generator for #count