The amount of concentration of matter in a given volume called Density is measured by different principles. In a pipe line one can employ mass flow meter given the pipe cross section.
In the most aggressive application such as abrasive slurries, non-contact measurement is probably the only solution.