I'm trying to get the length of my non list : I have this data I'm saving the player but I have one problem when I want to get the length of the "levels". I want to know how many levels there are with script so I don't need to keep changing an int variable and I'm also automating the process where the level gets added so I need to know how many levels there are. 

    PlayerData = new SetupData
        {
            // Level Data
            Levels = new Levels
            {
                Level1 = new Level
                {
                    Name = "First Level",
                    Progress = 0,
                    Completed = false
                },
                Level2 = new Level
                {
                    Name = "Second Level",
                    Progress = 0,
                    Completed = false
                },
            },
            // Character Data
            Player = new Player
            {
                SelectedColor = 0,
                Berries = 0
            }
        };

The problem is that this isn't a list or anything so I can't use `.Length`