As a historical note to @MauroALLEGRANZA's answer: It took quite a while for mathematicians to develop a clear (extensional) concept of "set". In particular in regards to the empty set (the unique set that has no elements) and singleton sets (sets that only have one element). It's only with the Principia (~1912), and after the axiomatic development of Zermelo-Fraenkel (~1908-1925) that is became very clear that a ≠ { a } (the set 'a' does not equal the singleton set with 'a' as only element).
In a very good historical overview, The Empty Set, the Singleton, and the Ordered Pair (2003), Akihiro Kanamori writes:
In 19th century logic, the main issue concerning the singleton, or unit class, was the distinction between a and { a }, and this is closely related to the emergence of the basic distinction between inclusion [i.e. being a subset of], ⊆, and membership [being an element of], ∈, a distinction without which abstract set theory could not develop. (...) Surprisingly, neither this distinction, nor the related distinction between a class a and its unit class {a} was generally appreciated in logic at the time of Cantor (1891). This was symptomatic of a general lack of progress in logic on the traditional problem of the copula (how does "is" function?).
Kanamori points to, for instance, Dedekind, who was unclear and confused about this in his work Was sind und was sollen die Zahlen? (1888) (~"What are numbers and what's up with them?") since he appears to identify 'a' with '{a}'. (He also points out that Dedekind later became aware of this.)
Kanamori gives a very detailed account of how Russell gradually got clarity, and that, even when class-inclusion and class-membership were seen as distinct, Russel may not have seen that the distinction of a from {a} directly follows from making that other distinction. That is, we can prove in first-order logic that ∀a (a = {a}) is logically equivalent to ∀a∀b (a ⊆ b ⇔ a ∈ b) (which would be tantamount to making the distinction useless).
To come back to the OP's question:
"The number of a class (set) is the class (set) of all those classes (sets) similar to it" (Russell) (...) [L]et us consider a set that contains 2 as its only element. This set is by definition an element of one since it is a set that contains only one member in it.
Note that Russel's words are pretty informal. His statement is not incorrect, perhaps, but it can easily lead to misinterpretation. If you define numbers in that way, as equivalence classes of classes, without further explanation or caveats, you run the risk (or at least the suspicion) of circularity and you are almost forced to adopt a kind of platonistic point of view. Not just this, you run the risk of obliterating the distinction between set-membership and set-inclusion! Since, indeed, in this case the number 2, and any other natural number, would then seem to be "contained" in the number 1 (the similarity class of all singleton classes).A So, even either 1 or {1} would seem to be "contained" in 1. (Whatever interpretation you here give to "contained", this then seems to imply that all the natural numbers would have to be 'given' all at once, in a kind of platonistic vision.)
In the elegant construction of natural numbers that was later developed by Von Neumann (~1923) circularity is avoided (and extensionality is preserved) by grounding each natural number, recursively, in previously constructed sets:
0 =def ∅
1 =def {0} = {∅}
2 =def {0, 1} = {∅, {∅}}
etc.
So, we start from the empty set, and at each step apply the rule: n + 1 =def n ∪ {n}. In this case the number 2 is defined as one particular set, namely, the set {0, 1}. This set, by construction, has exactly two elements (each of which are well-defined sets). Any other set that has exactly two elements can be mapped to that with a bijection (a one-to-one mapping). So, in a way we can salvage Russell's characterization, by defining a kind of emblematic set, the number 2, that indirectly represents all pairs. It's problematic, however, to try to start from a concept of "all pairs" (or more generally, from an unrestricted concept of equivalence classes).
(A) Strictly speaking: If 1 is defined as the equivalence class of all singleton sets, then the set {2}, rather than 2, would be "contained" as element in 1. But the point is that this doesn't avoid circularity in the definition. Russell gives an informal, but completely general definition of "(natural) number". But it's impossible to give a general definition without circularity unless you start from a given first number or set (zero or one) and apply a recursive rule.