During execution of a model, you can obtain a value of a global variable, which has already been defined, by calling getGlobalVariable(String variableName) of the ALH API. This method returns a Java object, which is the value of the global variable specified by the given variable name.
public Object getGlobalVariable(String variableName) { ... }
The example code is as follows
var a = ALH.getGlobalVariable("GLOBAL_COUNT") + 1
Note
You can obtain the value of a global variable directly by using its name.
var a = GLOBAL_COUNT + 1;