Robert M. Pirsig, whose “Zen and the Art of Motorcycle Maintenance,” a dense and discursive novel of ideas, became an unlikely publishing phenomenon in the mid-1970s and a touchstone in the waning days of the counterculture, died on Monday at his home in South Berwick, Me. He was 88.