Using arduino to control and meter oil

Then you would need to also know the oil pressure and the opening size of the solenoid valve. The open time and the pressure would allow you to compute the volume of oil that passed.