I know I am answering my own question, but I have some of my own ideas for this one.
In recent years, geologists have made a serious attempt at estimating the number of grains of sand. They made an estimate of the total volume of sand in all of the world's sedimentary rocks, beaches and deserts. They calculated that there are 147 million cubic kilometres of sand, and by making an assumption on average grain size and packing, they came to a number of 875 trillion trillion!
Despite the above, it is impossible to know the exact number accurately.