"num_examples" incorrect when using IterableDataset
When using ```torch.utils.data.IterableDataset```, logging ```num_examlpes``` (as in https://github.com/huggingface/transformers/blob/main/src/transformers/trainer.py#L1518) is not the actual num_examples,  but the number of examples processed on a single process.

For example, when I have 2000 training samples and 2 gpus, with and IterableDataset, current output be like: 
```
[INFO|trainer.py:1519] 2022-06-28 12:51:44,666 >> ***** Running training *****
[INFO|trainer.py:1520] 2022-06-28 12:51:44,666 >>   Num examples = 1000
[INFO|trainer.py:1521] 2022-06-28 12:51:44,666 >>   Num Epochs = 1
[INFO|trainer.py:1522] 2022-06-28 12:51:44,666 >>   Instantaneous batch size per device = 8
[INFO|trainer.py:1523] 2022-06-28 12:51:44,666 >>   Total train batch size (w. parallel, distributed & accumulation) = 16
[INFO|trainer.py:1524] 2022-06-28 12:51:44,666 >>   Gradient Accumulation steps = 1
[INFO|trainer.py:1525] 2022-06-28 12:51:44,666 >>   Total optimization steps = 125
```


Here's the possible cause I've found:
as defined in 
https://github.com/huggingface/transformers/blob/e02037b3524686b57c5a861ea49ac751f15568af/src/transformers/trainer.py#L1085
```num_examples``` is equal to ``` len(dataloader.dataset)```.
However, when ```isinstance(dataset, torch.utils.data.IterableDataset)```, the```dataloader.dataset``` is an instance of ```IterableDatasetShard```, which "generate samples for one of the processes only", whose ```__len__``` is the length of dataset on a single process, not the entire project.
Thanks for flagging! Could you double-check the PR above fixes your issue?