Fix number of examples for iterable dataset in distributed training
# What does this PR do?

As pointed out in #17913, when training in distributed mode with iterable datasets, the number of examples displayed is wrong. This is because we need to go grab the length of the underlying dataset of the `IterableDatasetShard`, not the length of the  `IterableDatasetShard` itself.

Fixes #17913
_The documentation is not available anymore as the PR was closed or merged._