unity csharp check how many of an object exists

Code Example - unity csharp check how many of an object exists

                
                        TotalAmount = FindObjectsOfType<Object>().Length;
                    
                
 

check if gameobject exists unity

                        
                                if (GameObject.Find("Name Of GameObject") != null)
{
    // GameObject exists
}