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
n
m
this problem seems to be SubSet Sum Problem
its an NP problem meaning all the solutions would be non-deterministic (i.e. there isn't any known efficient algorithm).
NP problem
non-deterministic
you can however try some heuristic approach and find some satisfying results in a more efficient way.