We describe a method for the recursive computation of exact probability distributions for the number of neutral mutations segregating in samples of arbitrary size and configuration. Construction of the recursions requires only characterization of evolutionary changes as a Markov process and determination of one-step transition matrices. We address the pattern of nucleotide diversity at a neutral marker locus linked to a determinant of mating type. Under a reformulation of parameters, the method also applies directly to metapopulation models with island migration among demes. Characterization of complete probability distributions facilitates parameter estimation and hypothesis testing by likelihood- as well as moment-based approaches.