adapt to std::iter::Iterator changes to count method