add a Counter iterator
auto merge of #6051 : thestinger/rust/iterator, r=catamorphism,pcwalton