How much rain falls on the Earth each year?
That's a tricky question, it will vary from year to year but we can narrow it down with some assumptions so I can give an answer. The assumptions will be:


All precipitation over the sea will become liquid in contact with the sea surface and will be considered as rain.
Precipitation over Antarctica is negligible at a global scale.


The second one is pretty reasonable: look at the global distribution of precipitation on the era of satellite data (reference).
 

With these assumptions we only need to compute the amount of solid precipitation on land (outside Antarctica) and subtract it from the global total. And we can do so using the data provided by the Global Precipitation Climatology Centre, which provide both the global mean precipitation on land:


And the fraction of liquid precipitation on land:


I've downloaded both datasets in ASCII format, and computed that the mean percentage of liquid precipitation is 74.1%, but we can't use that value, because it might be strongly affected by areas with little precipitation. So if we compute a cell by cell total SOLID precipitation per year, and multiply that for the surface of a 1°x 1° cell (considering the effects of latitude), we get a total of solid precipitation for 2016 of 1.5e13 m³.

So with the additional assumption that 2016 was a representative year. That will take your total precipitation of 5.1e14 m³ per year to 5.0e14 m³ per year of RAIN only.

Perhaps we should have expected that there is not much of a difference given that most of the rainfall happen on the sea (The total precipitation on land for 2016 was 1.1e14 m³ meaning that the 13.6% was solid and 86.4% was rain).

Now if you want to consider snowfall over the sea, I don't know of a model with such output product. Therefore, you can make a simple model or make some assumptions to use Sea Surface Temperature to figure out if precipitation will turn to rain at some high above the surface.

But again, if you look at the map of global distribution of precipitation, the fraction coming from latitudes at which you could expect sea surface snow is rather small, so the correction coming from snowfall over the sea is likely to be a pretty small one too.