You have declared all your variables as globals, so of course they will be shared between ALL instances of your class. To achieve what you want you need to put your variables inside the object struct. That way their scope will be local to each instance of your class.
////////////////////////// object struct
typedef struct _latch
{
t_object ob; // the object itself (must be first)
void* latch_output; //creates an outlet
// variable declarations
int i_outputValue;
int i_comparisonValue;
int i_incomingInt;
int i_latchRange;
} t_latch;