Calculates the number of combinations with repetition when choosing a subset of k objects from a pool of n objects.