PreTrainedModel: provide a more intuitive way of getting the current size of embeddings
### Feature request

Please add an intuitive and obvious method to get the size of the current token embeddings on `PreTrainedModel`.

For example, a method called `get_token_embeddings_size()` that can be used as a complement to `resize_token_embeddings()`.

### Motivation

Current API design around the `resize_token_embeddings()` method requires doing the following to increase the size of the token embeddings by 1:

```python
# add 1 new embedding
current_embeddings = my_xformer.resize_token_embeddings(None)
new_embeddings_size = current_embeddings.num_embeddings + 1
my_xformer.resize_token_embeddings(new_embeddings_size)
```

This is counterintuitive and bleeds implementation details to the call site. It requires me to know
1. that calling a "resize" method with the argument `None` returns the object to be resized (which is not intuitive), and
2. that "size" means the property `num_embeddings` on the returned object (admittedly it's not difficult to guess, but it is still a *guess*, and is in fact an implementation detail that I shouldn't need to know).

It would be better if I could do something like this:

```python
# add 1 new embedding
current_embeddings_size = my_xformer.get_token_embeddings_size()
new_embeddings_size = current_embeddings_size + 1
my_xformer.resize_token_embeddings(new_embeddings_size)
```

This provides an intuitively-named method to determine the current "size", and appropriately hides the implementation detail that "size" means the `num_embeddings` property on the object to be resized.

### Your contribution

Here's a proposed implementation:

```python
    def get_token_embeddings_size(self) -> int:
        return model_embeds.num_embeddings
```

i can make a PR if it would help.
Thanks for flagging, I had kind of the same problem recently when implementing #20043. I used
```
model.get_input_embeddings().weight.shape[0]
```
to get the embedding size, not sure if there is anything easier but having a method that does this would certainly be more helpful if you want to contribute it!
<|||||>PR made<|||||>I don't think you actually opened it, you just created a new branch :-)<|||||>ok PR actually made :)<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.