Fix number of examples for iterable datasets in multiprocessing
# What does this PR do?

As pointed out in #18608, `IterableDatasetShard.num_examples` is not always update in multiprocessing environments. This PR addresses that by ignoring the value in those cases. It also adds a stronger check of trusting the observed number of examples when for the reason the length is 0.

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