This is not strictly an epistemological question. Epistemology concerns itself with the limits and validity of knowledge. (How do we know? How much can we know?) Metaphysics, or specifically ontology, concerns itself with the nature of being or existence. (What is it?) As you can see, the two can overlap in some ways (how do we know what it is?), and certainly our answers to some questions will affect our answers to others; this has been most recently considered an ontological commitment, that is, by accepting the truth of various propositions, we commit ourselves to a specific ontology.
I have never seen clear presentations of the philosophy of mathematics except in the two ways ultrafilter mentions, though whether that is a testament to the strength of those two positions or simply my lack of exposure is not something I’m willing to state one way or another.
It seems, though, that if one remains committed to the notion that numbers exist, then one will probably side with platonism (anti-realism in mathematics is hard to come by without denying the truth of a great number of things we generally consider true), and as such one would generally be compelled to suggest that mathematics is a discovery of abstract objects, relationships, or most likely both.
Bertrand Russel, for example, commented in The History of Western Philosophy, “…[N]umbers are, in a certain sense, formal.” (I believe this is a direct quote, though I can hunt it down if anyone desires.) This speaks of a formalist view (whether Russell was a formalist is not really important here), which is roughly the position that mathematics is simply a complex set of rules for symbolic manipulation; that is, one could say, a game. This would make mathematics an invention.
Historically, mathematics has come about from both paths; that is, we have “mathematicized” observations (much of scientific activity involves divining the relationship implied by data), and we have also chosen pre-existing abstract mathematics to fit observations (non-Euclidean geometries came about before the application of those geometries to the problem of space-time, for example); and it is fair to say that some mathematical behavior fails to fall into either camp. (The calculus, for example: was this in response to data, or a way to explain the data? – the answer almost seems to be “both.”) To me, this does not indicate that platonism or formalism are somehow necessarily incomplete or wrong, only that the question of mathematical objects’ existence is probably at a level of discourse prior to the collection of evidence (since, frankly, it is something that we use to characterize the collection of evidence). Considerable weight for this position comes from the argument that mathematical knowledge is a priori, which means that it is independent of experience. Roughly, it would be suggested that no matter how many times I put one liter of water in with another liter of water and get two liters of water I would never come to the notion that “1+1=2”. I think there’s a lot to be said for that position, but I’m not going to outline it here. The a priori nature of mathematics is not meant to answer the question, only to indicate why it might be that historical trends in mathematics would not suggest any particular answer.
So, really, the answer is, “There is no set answer, but there are apparently several different ones that satisfy different metaphysical views (which, themselves, are difficult to choose between).”
As a personal matter, I lean towards formalism, and consider mathematics as “the language of certainty”.
Mathochist, I’m not sure what you mean by “19th century mathematics”. Several mathematicians have also been philosophers (Russell is a prime example, as is Frege), and in fact, some philosophers even began in mathematics and later became philosophers (Husserl, for example). More complex mathematics do not make the philosophy any more difficult; indeed, given its deductive nature, once the primary elements are accounted for the rest more or less follows. Sometimes new mathematical methods spawn new debates, like the issue of infinitesimals, but even then these were often argued prior to their mathematical use (Zeno’s paradox of motion, for instance, is a good example). While I would agree that you don’t necessarily need to adopt any particular view to perform mathematics, I do not believe that this demands that people haven’t answered the question for themselves. Most famous mathematicians have, in fact, supported some view or another (Godel, Russel, Frege, Hilbert, etc.). It is not necessary to know how an automobile works in order to drive it, but that does not suggest to me that people aren’t commited to various positions on why it works (of course, neither does it compel anyone to care, but that is a different matter).