This problem is the same as number of ways to partition n into exactly m parts.
The recurrence given in Wikipedia has
p(n,k) = the number of partitions of n using only natural numbers ≥ k
How to find no of partitions of n which has exactly k non-zero parts? Is there a recurrence relation to solve this?