Summary: When a sample is chosen with replacement, the same item may be chosen several times. The number of distinct items appearing in the sample is a random variable whose properties are explored in this paper. To avoid combinatorial difficulties, the distribution of the number of distinct items is derived by using a Markov chain approach. Expected values are derived from simple properties of Bernoulli random variables. Finally, the distributional results are used to test a random number generator.