Ultra-bright femtosecond X-ray pulses generated by X-ray free-electron lasers (XFELs) can be used to image high-resolution structures without the need for crystallization. For this approach, aerosol injection has been a successful method to deliver 70–2000 nm particles into the XFEL beam efficiently and at low noise. Improving the technique of aerosol sample delivery and extending it to single proteins necessitates quantitative aerosol diagnostics. Here a lab-based technique is introduced for Rayleigh-scattering microscopy allowing us to track and size aerosolized particles down to 40 nm in diameter as they exit the injector. This technique was used to characterize the `Uppsala injector', which is a pioneering and frequently used aerosol sample injector for XFEL single-particle imaging. The particle-beam focus, particle velocities, particle density and injection yield were measured at different operating conditions. It is also shown how high particle densities and good injection yields can be reached for large particles (100–500 nm). It is found that with decreasing particle size, particle densities and injection yields deteriorate, indicating the need for different injection strategies to extend XFEL imaging to smaller targets, such as single proteins. This work demonstrates the power of Rayleigh-scattering microscopy for studying focused aerosol beams quantitatively. It lays the foundation for lab-based injector development and online injection diagnostics for XFEL research. In the future, the technique may also find application in other fields that employ focused aerosol beams, such as mass spectrometry, particle deposition, fuel injection and three-dimensional printing techniques.