A generic mass flow measurement device was developed as a variation on the theme of counting. In a hypothetical infinitely sparse mass flow, the number of passing particles could be counted in a time frame and multiplied by the mean mass per particle to obtain a mass flow per time unit. In a mass flow of realistic density, however, particles travel in cluster formation and direct counting of individual particles is impossible. If a method could be available that reconstructs the original number of particles in a cluster, the mass flow can be computed for realistic clustered mass flows. This reconstruction algorithm was developed in this research; it uses the measured cluster lengths to reconstruct the total number of particles in each passing cluster. The lengths of the clusters were measured with an optoelectronic device. The reconstruction algorithm was developed using simulation, augmented by clustering theory. For identical diameter particle flow, simulation results showed that the number of particles in a cluster could be reconstructed using a very simple reconstruction formula. This formula uses only the total number of clusters per time frame and the total number of individual particles measured in the same time frame. However, identical diameter flow is not realistic, since even identical particles are measured with a certain error. Reconstruction of the realistic distributed diameter particle flow was approximated using the identical particle method. The optical mass flow sensor has major advantages over traditional methods. It is virtually insensitive to vibrations, contamination, temperature drift, and misalignment and the underlying measurement concept is well understood. But most importantly, the sensor does not require calibration. The mass flow of identical particles (4.5 mm air gun pellets) was measured with an error smaller than 3% even for high density flow rates.