I'm planning a long railway journey, and I wonder what the distance (to be) travelled is for a a particular route. Is there any website where I can find this out, for example, based on stations included with HAFAS and on HAFAS-recommended routes? For example, a journey from Berlin (Germany) to Inta (Russia) takes about three days and passes through Germany, Poland, Belarus, and Russia.
It's unclear to me where the data is being sourced from or how accurate it is, but Rome2Rio appears to have distances for each invididual segment. For your example, it shows Berlin-Moscow as 1152 miles, and Moscow-Inta as 1230 miles, with a couple miles of subway across Moscow and a bit of walking as well.
From https://www.rome2rio.com/map/Berlin/Inta, click on the "Night train, train" option, then expand each segment.
For Dutch railways, the Dutch language Wikipedia has a page for each railway; and each such page has a track map, including distances. Note that these pages are organize by railways; a typical trainroute will travel over sections of one or more railways. So you may have to do some work to find the distance between two particular stations.
The Dutch language Wikipedia site also lists German railways with distances, and so does the German language Wikipedia, but I don't know whether they have covered all the German railways. They also may cover some railways outside of the Netherlands/Germany, and so may other Wikipedia sites, but I have not checked.
For trains connecting to and from Russia, there is route information on tutu.travel. For example, Route 018Б Nice → Moskva reveals that the distance travelled from Nice to Moscow is 2958 km (and passing through eight countries).