distance

Provides a means to determine the number of increments or decrements necessary to get from the beginning to the end.

  template<class InputIterator>
  typename iterator_traits<InputIterator>::
  difference_type distance
  (InputIterator first, InputIterator last);  
Remarks

The distance from last must be reachable from first.

The number of increments from first to last.