Both definitions are outdated. As Husserl put it already back in 1901:"Only if one is ignorant of the modern science of mathematics, particularly of formal mathematics, and measures it by standards of Euclid and Adam Riese, can one remain stuck in the common prejudice that the essence of mathematics lies in number and quantity". In antiquity mathematics was almost exclusively about numbers and simple shapes, over the course of middle ages and 17th century functions and equations joined them. In 19th and especially 20th century mathematics underwent another transformation, so its content came to be represented exclusively by sets, even relations and operations on sets are sets. In 1950s abstract structures par excellence, mathematical categories, were introduced and deployed in various subfields and applications.
Perhaps we are better off looking not at what changed but at what remained invariant. Here is a summary by MacLane, a founder of category theory:"Mathematics is the study of those structures which arise in different uses but with the same formal properties – and mathematicians aim to carry out that study by using proofs. This view, unlike Platonism, also accounts for the ways in which mathematics is used in other sciences". So to use Aristotle's terms, mathematics is a study of forms abstracted from matter. This is what makes it so broadly applicable, algebraic structure of a group is embodied in fundamental symmetries of nature and individual crystals, living organisms and works of art. Form can be expressed as numbers, shapes, symbols, sets, categories and as yet unknown higher abstractions.
Because abstract form is not subject to observation or experiment, which can only witness the concrete, mathematics coined a different truth standard which is its cornerstone and characteristic feature - proof. In its ideal limit it takes the form of deductive proof in axiomatic systems, where all results can be derived symbolically from a few explicit and formally expressed assumptions.
However, while its beginnings go back to the ancient Greece this ideal was only fully formulated in the 20th century. It does not mean that proofs are expressed, or even ought to be expressed, as formal deductions, a mere possibility of such expression suffices. It also does not mean that mathematics is free of experimentation and heuristic reasoning, but their results are preliminary, and mathematicians always strive to validate them by proof in the end.
Reliance on proof as the standard of truth explains another of its characteristic features, demand for precision of definitions and arguments beyond that of natural language or even science, and the mathematical rigor. The rigor ensures that mathematics is logically transparent, precision and certainty of conclusions are exactly the the same as those of the assumptions, nothing is added in the middle. It also insures that it is highly sensitive to detail, no contradiction however minute is tolerated due to the law of explosion, and therefore highly testable. A 1993 article by Jaffe and Quinn about the nature of mathematics, its current state and relation to physics, and the role of proof and rigor in it, ignited a debate that offers great insight into modern perspectives. See the responses by several prominent mathematicians.
That mathematics has access to pure form without the benefit of senses has always been philosophically mystifying. It inspired Plato's theory of ideal forms, and Kant's theory of synthetic a priori, and Husserl's conception of formal sciences. Kant gives a deep, if somewhat dated, insight into how mathematics can be what it is:
"A new light broke upon the first person who demonstrated the isosceles triangle (whether he was called "Thales" or had some other name). For he found that what he had to do was not to trace what he saw in this figure, or even trace its mere concept, and read off, as it were, from the properties of the figure; but rather that he had to produce the latter from what he himself thought into the object and presented (through construction) according to a priori concepts, and that in order to know something securely a priori he had to ascribe to the thing nothing except what followed necessarily from what he himself had put into it in accordance with its concept".
And since every definition is a negation, as Spinoza put it, let us end with Husserl's delineation of the tasks of mathematics and philosophy:
"The construction of theories, the strict methodical solution of all formal problems will always remain the home domain of the mathematician.... If the development of all true theories falls in the mathematician's field, what is left over for philosophers? Here we must note that the mathematician is not really the pure theoretician, but only the ingenious technician, the constructor as it were, who looking merely at formal interconnections builds up his theory like a technical work of art... Mathematician constructs theories of numbers, quantities, syllogisms, manifolds, without ultimate insight into the essence of theory in general, and that of the concepts and laws which are its conditions... Philosopher inquires into the essence of theory and what makes theory as such possible".