Check out example codes for "unity list length". It will help you in understanding the concepts better.

Code Example 1

public List<GameObject> gameObjects = new List<GameObject>();
void Start()
{
	int listLength = gameObjects.Count;
}

Code Example 2

//Get list length / count

//Example
public List<GameObject> gameObjects = new List<GameObject>();

void Update()
{
  int listLength = gameObject.Count;
    if(listLength >= 0)
      	Debug.Log("Do something");
    else
       	Debug.Log("Do something else");
}

Code Example 3

public List<Transform> items = new List<Transform>();

void Start()
{
    print(items.Count);
  
    items.Add(new Transform());
  
    print(items.Count);
}

//output\\

/// 0 

/// 1

Learn ReactJs, React Native from akashmittal.com