A DC brushless motor of a roller pump (5) driven to transport liquid in a flexible tube is controlled by a controller according to a count by a pulse counter that receives the output from a frequency quadrupler that quadruples the number of pulses generated by an encoder unit. The encoder structure may restrict the reduction of the interval between transparent parts of first and second encode patterns so as to allow the encoder unit to increase the number of pulses depending on the revolutions of the output shaft of the DC brushless motor. If the resolution of the actual liquid flow represented by the pulses from the encoder unit is increased, however, the number of the output shaft of the DC brushless motor can be detected with sufficient resolution even at decreased speed of the motor shaft, thus allowing the liquid in a flexible tube to be transported accurately and quantatively.