Removing A Component From An Instantiated Prefab After X More Are Instantiated

I want to remove a rigidbody from one instantiated prefab after a specific number more are instantiated.I know you can do Destroy (blank.rigidbody) but I want it to do that after a certain number more prefabs are instantiated. Any help would be appreciated.

Attach this script your prefabs:

static var counter:int; // "static" will define a global variable.

function Start(){
  counter++; // On object instantiated add one more the counter

  if(counter >= 10){ // if counter reached 10 and above remove the rigidbody.
    Destroy(GetComponent(Rigidbody));
  }
}