supplying a member function to PinChangeInt

Having tested a homemade wheel encoder I now want to put the code into a class as there will be 4 wheel encoders on my robot and I would like to simply create 4 encoder objects.
A cut down version of the class would be:

class Encoder
{
    public:
    Encoder(int pin)
    {
        ticks=0;
        PCintPort::attachInterrupt(pin, count,FALLING);
    }
   void count()
   {
       ticks++;
   }
   int ticks;
};

So I try to create an encoder object and in the constructor link the pin to the member function count so that count receives the interrupt when pin goes low.
Unfortunately the compiler complains that “count” is
Googling has explained the error but not provided a solution. Does anybody have any ideas how to get around this or even a different solution not involving classes that will achieve the same result.

The handler must be a function, not an instance method. To have an interrupt execute an instance method you can save a global reference/pointer to the instance and write a static function which invokes the appropriate method of that instance. The static function is what you would register as the interrupt handler.