What is the number of permutations of $m$ objects in $n$ spaces such that there are exactly $l$ repetitions in the permutation?
for example,
if $m = 5, n = 7, l = 4$
then $$a_1, a_1, a_1, a_3, a_3, a_4,a_4$$
is a legal sequence (4 repetitions, $a_1$ twice, $a_3$ once and $a_4$ once) but
$$a_1, a_2, a_3, a_1, a_3, a_5, a_3$$ is not (only 3 repetitions).
and neither is
$$a_1,a_1,a_1,a_1,a_1,a_1,a_1$$ legal.
The main difference of this problem from other posts such as Calculating number of permutations given N repeats allowed is that my number of repeats is global, i.e I require that the number of repetitions of all objects together is exactly l.