What is the mathematicians modern rigorous definition of number ?
There isn't one!
If there is one, a "number" is an element of a "number system"
A "number system" is some set, associated typically by some "operations" that you can use upon the elements of the set, for example "adding" two of the "numbers" together.
This is my very informal view of this, however..
What type of number? A natural number? An integer? A quotient? A real number? A complex number? A hyper-real number? A hyper-complex number? A trans-finite number? A surreal number?...
All of these have different definitions.
Apparently it seems that a number is defined as being an element of some defined set.
It is quite funny that "element" and "number" mean the same thing. So in fact we can define anything we want as a number !
Some collection of things whose members we often refer to as numbers are not sets, to give you an example the 'surreal numbers' form a proper class (i.e. they do not form a set).
Element and number are not synonyms; it certainly is not common to call every member of a set (or a class) a number.
I didn't state which kind of number because, I didn't feel that it would ultimately make any difference to the question.
the last comment made is true I guess in the sense that the two words element and number, are equivalent in meaning.
is it wrong to define it as a quantity of things eg apples ?
That definition is misleading. You end up having to twist and distort it to an unrecognizable lump after encountering various number systems. Considering just the negative integers, you then have to modify it by "also an absence of quantity" or some other interpretation. It only goes downhill from there. What quantity does sqrt(-1) measure ? Then you start to redefine quantity until the original statement is meaningless. While all quantities may be described by numbers, not all numbers represent quantities. Some are quite qualitative.
No, no one said that- a "number" is an element of some specifically defined sets, not just any set! In order to be a "number system" the set must have other things associated with it- primarily operations such as addition or multiplication. Of course,mathematicians do, regularly, define such operations for all kinds of "things" so we could in a very specific way "define" anything we want as a number!
In fact to demonstrate such a thing one of my first lectures last year for a course started off by creating a set of cutlery and using them as numbers after defining addition and multiplication on them.
Separate names with a comma.