Statics tutorial - different results?

Hello, I am following the “Statics” tutorial from the Unity Learn Platform.

While using the same scripts from the tutorial I noticed something strange regarding those two codes:

Small note: I am not an English native language speaker, so it could be explained in the tutorial but I didn’t understand it.

Enemy.cs

using UnityEngine;
using System.Collections;

public class Enemy
{
    //Static variables are shared across all instances
    //of a class.
    public static int enemyCount = 0;
    
    public Enemy()
    {
        //Increment the static variable to know how many
        //objects of this class have been created.
        enemyCount++;
    }
}

And Game.cs

using UnityEngine;
using System.Collections;

public class Game
{
    void Start () 
    {
        Enemy enemy1 = new Enemy();
        Enemy enemy2 = new Enemy();
        Enemy enemy3 = new Enemy();
        
        //You can access a static variable by using the class name
        //and the dot operator.
        int x = Enemy.enemyCount;
    }
}

That way the value of Enemy.enemyCount is 3, and it’s correct. However if I declare the three “Enemy” before Start() the value of Enemy.enemyCount is 6.

    public class Game
    {
            Enemy enemy1 = new Enemy();
            Enemy enemy2 = new Enemy();
            Enemy enemy3 = new Enemy();

        void Start () 
        {                       
            //You can access a static variable by using the class name
            //and the dot operator.
            int x = Enemy.enemyCount;
        }
    }

Can someone please explain to me what is happening?

I can’t explain exactly why that is happening but you should not be instantiating variables outside method calls.
You can put them inside awake(), which happens first
or inside start, which happens just after
and they should work just fine.

This might help you understand the order in which methods are called.