If you would like to measure a proportion of solids in a liquid in a two phase flow then it is possible to use an inline density measuring device. If your basic liquid is constant then you can calibrate density as a function of solids content.
Once I read a paper where a non contact measurement of conductivity was used for the same purpose.
In both cases you need a carefully performed calibration.
It would be good to know more about your liquid and about the sand.
m777182
As m777182 has said it would be possible to measure density with a nucleonic type device. This would work with the following principle that materials of greater density absorb more gamma radiation. Thus if you can guarantee the process flowing is constant, any other absorbed radiation must be due to a higher density material flowing past the nucleonic. Meaning in a spot measurement you could determine how much solid / sand is passing that point and equate that to volume of sand per barrel.
The problem is that the process is very often not a stable flow thus errors can occur.
What is the route of the pipeline downstream is it into a vessel / separator? There are many devices that would be able to monitor sand / solid build up in a vessel for instance a phase profiler.
This is also an excellent application for vibrating element density meters, in case you don't want all the hassle that goes with nucleonic.
THey have success in underflow measurement, pipeline measurement and in classifiers.