Better way to find inactive objects

Hi, Im starting to develop games with Unity, I know one thing or another about programming logic but Im still a noob.

My question is: in Unity first tutorial (roll a ball) there`s a counter that shows off how many objects we have “collected”.

The problem is that we have to use a code with exact number of objects collected to show us that we won, and I was wondering if we can change that to something like: if all objects in “Pickups” Hierarchy object are inactive, it would show us we won.
(I hope it’s not confusing), here is the code for reference:

using UnityEngine;
using System.Collections;

public class PlayerController : MonoBehaviour 
{
	public float speed;
	public GUIText countText;
	public GUIText winText;
	private int count;
	void Start ()
	{
		count = 0;
		SetCountText();
		winText.text = "";
	}
	void FixedUpdate ()
		{
			float moveHorizontal = Input.GetAxis("Horizontal");
			float moveVertical = Input.GetAxis("Vertical");
			Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);
			rigidbody.AddForce(movement * speed * Time.deltaTime);
		}
	void OnTriggerEnter(Collider other)
	{
		if(other.gameObject.tag == "PickUp")
		{
			other.gameObject.SetActive(false);
			count = count + 1;
			SetCountText();
		}
	}
	void SetCountText ()
	{
		countText.text = "Count:" + count.ToString();
		if (count >= 7)
		{
			winText.text = "you win";
		}
	}
}

I don’t know whether I understood you properly.This code will help you find whether all objects under a gameobject(which this script is attached to) is inactive or not.

	//Function to check whether all children of a gameobject is inactive or not
	bool IsAllObjectInactive()
	{
		//The final resultant variable
		bool ResultValue=true;

		//Loop through all children
		for(int loop=0;loop<transform.childCount;loop++)
		{
			if(transform.GetChild(loop).gameObject.activeSelf)
			{
				//Change the result value stating there is an active object in the children
				ResultValue=false;
				//Exit loop
				break;
			}
		}

		//Log out
		Debug.Log("Is All Inactive - "+ResultValue);

		//Return the value
		return ResultValue;
	}

Attach this script to the parent gameobject which holds all the child ball objects.Call function IsAllObjectInactive() to find whether is there any active object in the hierarchy.

Hope this helps…!!!