Checking an objects script to change an int on another script

I was wondering how I would go about checking an objects script / coordinates so that way it would affect another scripts integers. This would be used with 21 different objects.

Something like:

Object.js:

var Cor : Position;

function Update(){

if(input(get.position) == Cor){

get.script("Correct.js")
intCor == +1

}


}



ObjectCheck.js:


var intCor : int = 0;

function Update() {

if(intCor = 21){
level.load(nextlevel)
}

}

How would I go about doing this?

http://unity3d.com/learn/tutorials/modules/beginner/scripting/getcomponent