I have to create a method that takes two integers, let them be n and m, and returns how many ways there are to sum m positive numbers
You could use dynamic programming. Let f[n][m][k] be the number of of partitions of m non-decreasing positive numbers such that the sum is n and the last one is k. Then you could easily see that the update step would be:
f[n][m][k] → f[n+l][m+1][l] for every l≥ k
To get f[n][m], meaning the number of all partitions independent on which is the last number, at the end just sum over all k. The complexity would be O(n^2 m).