Inventory or Quantity field TL;TR: Like there is no module like this for D8, how can I create a plugin wich has two fields: one to reference content and onther one to store a number, so I can emulate an inventory.

Hi, I'm using Drupal 8. Is there any module that let me put just a simple number for a node reference? something like an inventory or quantity field.

I've checked for an inventory field on drupal.org but seems to be pretty outdated (drupal 5)

Like an example just image you are going to make an inventory of the animals and plants in a given area; so there is a content type for "animals" and there is a content type for plants (every one with it's own atributes)... and there is a content type "country". So when I'm creating a country I'll like to specify how many dogs, cats, mules, cows, pines, etc does it have. Note that the country has a field that references to the animal or plant node. Using D8, pointing me to an API that let me store and correlate the information can also help me.
This solved my question: https://www.lullabot.com/articles/extending-a-field-type-in-drupal-8

It is an example of how to extend the reference field and also associate a quantity with the reference. It was what I was looking for.