For typical diesel you need two, one to measure fuel going into the pump and one to measure it going out.
I thought briefly that you could use one flowmeter, but the pumps (bosch at least) have internal bypasses that make it difficult, as John points out.
Rather than timing the injection pulse lengths, you just count the number of pulses from the flowmeter, as each pulse represents a certain volume of fuel (more or less). If you have one on input and one on output then you subtract the output count from the input. With the flow rate of the output it might have reasonable resolution. You might still want to time the length between pulses for more predictive instantaneous readings, but for the longer term trips you really just care aboout the total pulse count.
Though the flowmeter approach is probably better suited for the
Carb thread since that is a single sensor solution for carbs, just don't have a solid on flow sensor sources.
I am liking the chances with the dual knock sensor approach for the diesels. I'm sure the price can come down later since knock sensors are glorified peizos, and piezos are cheap.