How to use a single value for collectable items? [2 player game]

Hey guys, I currently have an item collector script which does pretty much what you’d expect. I have 2 controllable characters on my project and when i tried using the script, they both had their own counters for some reason. What i mean is that I collected a few items with one of them and then switched into the other one and tried to collect another item but the counter started from 0 because they’re not sharing the same value even though I don’t have anything on the code that makes it do that. Any ideas?

using UnityEngine;
using UnityEngine.UI;
public class ItemCollector : MonoBehaviour
{
    public Text scoreText;
    private int goldAmount;

    void Start()
    {
        goldAmount = 0;
        scoreText.text = "Golds : " + goldAmount;
    }
    private void OnTriggerEnter2D(Collider2D other)
    {
        if(other.tag == "Collectables")
        {
            goldAmount += 1;
            Destroy(other.gameObject);
            scoreText.text = "Golds : " + goldAmount;
        }
    }
}

I got it fellas, thanks to one of my uni classmates.

Here’s what solved the issue;

using UnityEngine;
using UnityEngine.UI;
public class ItemCollector : MonoBehaviour
{
    public Text scoreText;

    void Start()
    {
        IncreaseValue.goldAmount = 0;
        scoreText.text = "Golds : " + IncreaseValue.goldAmount;
    }
    private void OnTriggerEnter2D(Collider2D other)
    {
        if(other.tag == "Collectables")
        {
            IncreaseValue.goldAmount++;
            Destroy(other.gameObject);
            scoreText.text = "Golds : " + IncreaseValue.goldAmount;
        }
    }
}

public static class IncreaseValue
{
    private static int _goldAmount;
    public static int goldAmount
    {
        get
        {
            return _goldAmount;
        }
        set
        {
            _goldAmount = value;
        }
    }
}