how to update a specific script from a prefab to the in scene object

i have a script with a integer that changes when a object is destroyed but it affects only my prefab, not the in scene object, how do i update the script so that can affect my object in the scene?

The simplest way I think is probably to find the object(s) you want to update in the scene. Then send it a message with the new value or how to update their value.
If you have multiple objects that you need to update, find them all in an array and loop through it.

//Object that is changing the value
GameObject someobj = GameObject.FindGameObjectWithTag ("someObject");

someobj.SendMessage ("UpdateInt", i);

You then make a function in the object called the same thing as the string in SendMessage. In this case, UpdateInt.

//The object receiving the update

int intToBeChanged = 0;

void UpdateInt(int i){
intToBeChanged = i;