Hint: What is the difference between a "relation" and a "function"? What restriction does this put on the number of relations that could be functions?
A function is a relation such that there if (x,y)belongs to f and (x,z) belongs to f, then y=z, so perhaps it will be something like -(2^(mn)-mn) since that is like the relations minus the functions, but then the opposite...obviously I can look up basic definitions, that is not where I need help, but thanks anyways.
EDIT: ignore that, I think it is n^(m)