Check out example codes for "unity how to tell how many objets are in a folder". It will help you in understanding the concepts better.

Code Example 1

void Start()
        //I needed to get a count of my all level prefabs from my
        //Resources folder so I hashed together this frankenstein code:

        //Get the path of the Levels folder from Resources
        string AssetsFolderPath = Application.dataPath;
        string levelFolder = AssetsFolderPath + "/Resources/Levels";

        Debug.Log("dataPath : " + levelFolder);


        //DirectoryInfo needs "using System.IO"
        DirectoryInfo dir = new DirectoryInfo(levelFolder);
        FileInfo[] info = dir.GetFiles("*.prefab");
        int fileCount = info.Length;

        Debug.Log("Level Count: " + fileCount);

        //Clear array to save space, needs "using System"
        Array.Clear(info, 0, info.Length);

Learn ReactJs, React Native from