The variable "i" had not been declared here. You can't just copy & paste lines of code and expect them to work. Each line of code is written for a particular context and won't necessarily make sense elsewhere without alteration. Try this:
if (encoder[1].count = 1)
The code you copied was written to be able to deal with multiple encoders. The line you copied was originally inside a for loop:
for (int i=0; i<NUMENCODERS; i++)
{
...
}
That for() loop provided the variable "i". When you pasted that line into loop(), there was no "i" so the line made no sense.
You really need to brush up on your basic coding skills!