Does it output analog or digital? if its digital try using the Counter class, if its analog then use something like
Code:
int count
if(encoder.getVoltage() >"voltage when ticked") {
count = count + 1; // or count ++;
P.S i would think it is digital but if its not try that /\