I don't think it is so much to protect the motor, as it is to reduce noise in the circuit (and perhaps protect the driver); usually, a small disc capacitor is used - but as far as size is concerned, I am not sure where you start, or if there is a way to calculate it...?