How to reconcile Jech's different definitions of cardinal numbers? Thomas Jech begins the chapter 3 of his Set Theory (p. 27), titled Cardinal Numbers, as follows (in all excerpts below, the emphasis in bold letters is mine):

Two sets $X$, $Y$ have the same cardinality (cardinal number, cardinal), $$\tag{3.1} |X| = |Y|,$$ if there exists a one-to-one mapping of $X$ onto $Y$.

This looks to me like a complete definition of cardinal numbers.  (I will call it Definition 1.)  But immediately after the paragraph above, Jech writes:

The relation (3.1) is an equivalence relation.  We assume that we can assign to each set $X$ its cardinal number $|X|$ so that two sets are assigned the same cardinal number just in case they satisfy condition (3.1).  Cardinal numbers can be defined either using the Axiom of Regularity (via equivalence classes of (3.1)), or using the Axiom of Choice.  In this chapter we define cardinal numbers of well-orderable sets; as it follows from the Axiom of Choice that every set can be well-ordered, this defines cardinals in ZFC.

I don't know what to make of the sentence in bold.  Does it mean that the real definition of cardinals is still coming, and therefore that Definition 1 does not count somehow?  Or does it mean that Definition 1 is what the statement "In this chapter we define cardinal numbers of well-orderable sets" is referring to?  If the latter is the case, which of the two alternative approaches (via Axiom of Regularity or via Axiom of Choice) is being used in Definition 1?
The confusion does not end there.  After Jech has already been using terms like "cardinal numbers" and "cardinals" quite extensively, including (on p. 28) a complete definition of the "arithmetic operations on cardinals", on p. 29 he writes

An ordinal $\alpha$ is called a cardinal number (a cardinal) if $|\alpha| \neq |\beta|$ for all $\beta < \alpha$.

I will call this definition of cardinal numbers Definition 2.
I have the same questions about Definition 2 as I had about Definition 1.  I.e. is Definition 2 what the sentence "In this chapter we define cardinal numbers of well-orderable sets" is referring to?  If yes, which of the two alternative approaches (via Axiom of Regularity or via Axiom of Choice) is being used in Definition 2?
Finally, how can these two different definitions of cardinal numbers be reconciled?  How is one supposed to know which one is being referred to whenever Jech uses terms like "cardinal numbers" and "cardinals" in the rest of the book?  Is this as appalling as it looks, as a piece of mathematical exposition, or am I missing something?
 A: I would like to take a different point of view on your post, and suggest to you a way of reading these mathematical passages so as to avoid the confusion into which you stumbled.
Just from the way that Jech writes those passages, one is invited to think as follows.
The first sentence defines a property of a pair of sets, namely the property that those two sets "have the same cardinality".
Your own internal mathematical processor could then say to itself "That sounds like an equivalence relation... Is it? .... [thinks a bit] ... Yup, reflexive, symmetric, transitive. GREAT! Now I know what it means for two sets to have the same cardinality."
Jech then invites you, in the next parenthetical comment, to substitute the word "cardinality" with "cardinal number".
You wrote in your post

This looks to me like a complete definition of cardinal numbers.

But your own internal mathematical processor could instead say to itself: "So now I know what it means for two sets to have the same cardinal number... but that's not telling me yet what an actual cardinal number is... Just because I know that two sets have the same BLAH, it doesn't quite follow that I know what a BLAH is..."
And then, in the next paragraph, Jech is inviting you to look forward to the next step, i.e. the actual definition of a cardinal number.
You are in good company, it took the mathematical community a few decades, from Cantor to Von Neumann, to take this step.
A: In a substantial and sober-minded sense $(3.1)$ does say what a cardinal number is. But for various reasons one seeks ways of encoding everything as some sort of set, and therefore one identifies a cardinal number with a certain ordinal, and ordinals with certain sets called von Neumann ordinals, of which an example is $\{\varnothing,\{\varnothing\}\}.$
If you're familiar with the idea of identifying real numbers with equivalence classes of Cauchy sequences or with Dedekind cuts, this is a similar sort of thing.
A: Here's how I think about it:

*

*(Def) Two sets $X,$ $Y$ are equinumerous if there is a bijection between them.

*(Def) An ordinal $\alpha$ is a cardinal if no lesser ordinal is equinumerous with it.

*(Thm) If $X$ is a well-orderable set, there is a unique cardinal $\kappa$ such that $X$ is equinumerous with $\kappa.$

*(Def) The unique $\kappa$ from the previous theorem is called the cardinality of $X,$ denoted $\kappa = |X|.$

*(Thm) For any two well-orderable sets $X$ and $Y,$ $X$ is equinumerous to $Y$ if and only if $|X|=|Y|.$
When we assume the axiom of choice, every set is well-orderable so we can happily drop the restrictions to well-orderable sets in the above.

As Jech alludes to, in the absence of choice, one can also define cardinals for non-well-ordered sets using regularity. The way this works is that equinumerousness is an equivalence relation and so one might want to simply define the cardinality of a set to be its equivalence class under this relation. But the problem is that these equivalence classes are proper classes, not sets. The way that regularity allows you to get around this is that it implies every set has an ordinal rank, and classes of bounded rank are sets. So you can define quasi-equivalence classes by letting $[x]$ be the set of all sets that are equinumerous to $x$ and of minimal rank.

*

*(Def) A set is a cardinality if it is equal to $[x]$ for some set $x.$

*(Def) The cardinality of a set $x$ is $[x].$

*(Thm) Two sets are equinumerous if and only if they have the same cardinality.

(Note that it is certainly not necessarily the case that $x$ and $[x]$ are equinumerous, unlike in the situation for well-ordered cardinalities.)

The notations and terminology choices I made here are not universal by any means, and this is in general pretty variable between different authors.
The definitions for well-ordered cardinals are of greater importance, not just because AC is typically assumed, but also since even in AC's absence it is useful to define cardinality for well-ordered sets in this way. (The term "aleph" or "well-ordered cardinal" is often used in place of "cardinal" in these contexts.) It is convenient to both have a canonical set of a certain size, and one that has a natural well-ordering that you can do induction on.
The definition from regularity is mostly just of technical importance. The general trick of using foundation to represent equivalence classes of proper class-sized equivalence relations is called Scott's trick and it is used in other contexts as well, such as defining ultrapowers of the set theoretical universe.
A: What we'd ideally like to do is to put an equivalence relation $\sim$ on the class of all sets, so that $S \sim T$ iff there exists a bijection $S \to T$, and then define $|S|$ to be the image of $S$ under $\sim$. Unfortunately, the class of all sets is not actually a set, and so this doesn't work. Similarly, it would be nice to define a function from sets to some sort of object representing cardinality, and define $|S|$ to be this object; again, we run into the problem of defining exactly what a function with a domain that isn't actually a set. The workaround is just to write--- purely formally--- $|S| = |T|$ iff there's a bijection $S\to T$, which suggests the idea of the earlier construction but avoids foundational issues. In particular, write $|S| = n$ if $|S| = |\{1, \dots, n\}|$ (with the latter set defined elsewhere, and $n = 0$ corresponding to $\varnothing$). Defining $|S| \leq |T|$ or $|S| \geq |T|$, etc., is analogous, though it takes a bit of work to show that $|S| \leq |T|$ and $|S| \geq |T|$ implies $|S| = |T|$. This result would imply that $<$ is a total order on sets modulo $\sim$, but unfortunately there's the same foundational issue with what exactly "sets modulo $\sim$" means.
So, on to the latter construction. In ZFC, every set has a bijection onto a unique cardinal (e.g., via the well-ordering theorem, which is equivalent to the axiom of choice). That's effectively giving us for each set $S$ a well-defined representative of the equivalence class of $S$ modulo $\sim$, which puts the construction above on more solid ground, taking $|S|$ to be this unique cardinal.
A: 3.1 defines an equivalence relation. There is then a correspondence between the equivalence classes of that equivalence relation and cardinalities: each equivalence relation corresponds to a cardinality, all sets in that equivalence class have that cardinality, and any set with a different cardinality is in a different equivalence class. This is potentially cumbersome, however, if we wish to use it as a definition of "cardinality"; any time we want to investigate the cardinality of a set, we have to analyze it compared to all the equivalence classes we have so far identified. For each class, we have to determine whether any bijection exists (a possibly difficult task even for one class, and one we have to repeat for each class until we find in the affirmative) and if no class has any bijection, we need to establish a new equivalence class. This is a completely nonsystematic analysis; we end up with simply a collection of equivalence classes, with no inherent structure. Think of it like species: if you define species as a set of organisms that can interbreed with each other, but not with other species, we end up with an equivalence class (interbreeding isn't actually an equivalence relation, but let's ignore that for the sake of the analogy). This technically defines the concept of "species", but actually putting that into practice requires constantly checking whether organisms can interbreed, and any taxonomy relating the different species has to come from other sources. 3.1 allows us to assign sets to equivalence classes, but we need more for the those equivalence classes to really deserve the label "numbers"; it doesn't give any structure to the collection of classes, such as having any concept of "bigger" (we can easily define $\geq$ in terms of surjections, but that's not inherent to the 3.1).
The sentence in bold promises some further definition. It's not clear exactly for that sentence what that definition is going to be, but it suggests that it's going to give some algorithm that takes a well-ordered set as input, and gives some output that characterizes a cardinality equivalence class. Continuing my species analogy, suppose there were some program that you could feed in an organism's DNA that always gave the same result for two organisms of the same species, and always gave different answers if the organisms were of different species. Having that program would be much more useful than just having the definition interbreed = same species.
What you've labelled "Definition 2" is arguably imprecise. At least from some perspectives, ordinals and cardinals are different categories: each cardinal corresponds to an ordinal, but no cardinal is an ordinal. In set theory, one representation of ordinal numbers is a set, and often that representation is treated as being the ordinal. Cardinality, on the other hand, is an equivalence relation, so cardinals are labels we put on classes of sets. Those classes of ordinals are themselves sets, but they're not sets that follow the rules for "ordinal" sets, as they do not contain every set smaller than them.  So arguably, the statement should be "An ordinal α corresponds to a cardinal number (a cardinal) if |α|≠|β| for all β<α." Basically, we take the smallest ordinal of each equivalence class as the representative member of that class, and use that ordinal as the label of that class. If an ordinal isn't the smallest member of its class, it doesn't correspond to a cardinal number. So this is something that qualifies as "some algorithm that takes a well-ordered set as input, and gives some output that characterizes a cardinality equivalence class" that I mentioned earlier: given a class, take its smallest member, and characterize the class in terms of that member. I think that the reason they specified that they were talking about well-orderable sets in the earlier sentence; if each class has a well ordering, then it has a smallest member given that order. So this is using the Axiom of Choice.
A: Jech claims that there exists some definable function that maps each set $S$ to something called its cardinality denoted by $|S|$. Jech at that point has not shown that such a definable function exists. That is why he said "we assume that we can assign ...".
Note that the answers claiming that (3.1) defines cardinality are misleading, because there is not even a set of all sets with cardinality $1$, so these are fundamentally different from equivalence classes in ordinary mathematics. (Daniel Schepler did mention this in a comment, but it wasn't made clear in other existing answers.)
It turns out that in ZFC, we can in fact define for each set $S$ some ordinal $|S|$ that satisfies the desired property (3.1), and we call that ordinal a cardinal. Some authors do not like the idea of cardinals being ordinals, but that's just a matter of abstraction and typing, not substance. (For an analogy, when we say "$x∈ℝ$" we do not mean $x$ is some set of Cauchy sequences of rationals.) See here for further elaboration.

In this chapter we define cardinal numbers of well-orderable sets; as it follows from the Axiom of Choice that every set can be well-ordered, this defines cardinals in ZFC.

This is simply a preamble to the fact that, for every set $S$, there is some well-ordering of $S$ (relying on AC), and so there exists some minimum ordinal $k$ that is in bijection with $S$, and hence we can define $|S|$ to be that $k$.
