Why doesn't this code work?

The actual collision part works but the part that doesn’t work is the remainingEnemyShips variable. It always gives back 4 but doesn’t go lower.

   private int remainingEnemyships;

    void Start() {

    //Getting the name of the current scene.
    Scene currentScene = SceneManager.GetActiveScene ();  
    string sceneName = currentScene.name;

      //Confirming that the active scene is Scene1
      if (sceneName == "Scene1") {
        remainingEnemyships =  5;
      }
    }

    void OnCollisionEnter2D (Collision2D col) {
      if (col.gameObject.tag == "EnemyShip") {  //If bullet hits enemy ship

        remainingEnemyships = remainingEnemyships - 1; //Decreasing the variable by 1
        Debug.Log(remainingEnemyships); //Always gives back the number 4

        Destroy(col.gameObject);
        Destroy(gameObject);
      }
    }
}

i imagine what you want is remainingenemyships to be shared across all instances right?, since probably there are a lot of objects in the scene with that script (since you are destroying that object when you collide with it) just change remainingships to static

private static int remainingEnemyships;