I don't think you need much. I think it is just enough space to get the pipes in. I am not at home so I cannot look at my washing machine but I think I only have a couple of inches at the back. The washing machine is the same width as the sink if not an inch less, it fits under the work top they have made for it.
As much as possible but usually enough so that the drain ribbed pipe does not become crushed so the water can drain off otherwise a smell can develop in the drum.