How get a count of Lists assigned
I heave a many lists on my gameObject, a simple :
public class PlayerStats : MonoBehaviour {
public List<BaseSword> Sword = new List<BaseSword>();
public List<BaseShield> Shield = new List<BaseShield>();
public List<BaseArmor> Armor = new List<BaseArmorr>();
public List<BaseHead> HEad = new List<BaseHead>();
public List<BaseLegs> Legs = new List<BaseLegs>();
......
How can i get a count or length lists on my object ? Something like a gameObject.GetComponent().count (or something). I need know how many lists heave this object
If the question is How many Lists the Object (PlayerStats) contains. Then your logic is probably flawed and most certainly you don't really need such an information.
Anyway to do something like this you could
Have a readonly field where you assign the proper number *public readonly int count = 5;
Use reflection (normaly would not recommend this but it is for just one time)
The easiest way is to use the 1 suggestion. But the most robust way would be to use a property (and a private field to save said value) where you ll lazy assign the value via reflection and then use this value (as the number of Lists won't probably change, unless you create code on runtime).
Anyway i would recommend to rethink what are you trying to achieve and try to figure an other way that does not rely on such information (that s why I did not provide a concrete solution). Cheers.