In set theory, the concept of cardinality is significantly developable without recourse to actually defining cardinal numbers as objects in the theory itself (this is in fact a viewpoint taken by Frege; Frege cardinals are basically equivalence classes on the entire universe of sets, by equinumerosity). The concepts are developed by defining equinumerosity in terms of functions and the concepts of one-to-one and onto (injectivity and surjectivity); this gives us a quasi-ordering relation
A\leqcB \iff (\existsf)(f:A\toB is injective)
on the whole universe by size. It is not a true partial ordering because antisymmetry need not hold: if both
A\leqcB
B\leqcA
A=cB
A\leqcB
B\leqcA
Nevertheless, most of the interesting results on cardinality and its arithmetic can be expressed merely with =c.
The goal of a cardinal assignment is to assign to every set A a specific, unique set that is only dependent on the cardinality of A. This is in accordance with Cantor's original vision of cardinals: to take a set and abstract its elements into canonical "units" and collect these units into another set, such that the only thing special about this set is its size. These would be totally ordered by the relation
\leqc
In modern set theory, we usually use the Von Neumann cardinal assignment, which uses the theory of ordinal numbers and the full power of the axioms of choice and replacement. Cardinal assignments do need the full axiom of choice, if we want a decent cardinal arithmetic and an assignment for all sets.
Formally, assuming the axiom of choice, the cardinality of a set X is the least ordinal α such that there is a bijection between X and α. This definition is known as the von Neumann cardinal assignment. If the axiom of choice is not assumed we need to do something different. The oldest definition of the cardinality of a set X (implicit in Cantor and explicit in Frege and Principia Mathematica) is as the set of all sets that are equinumerous with X: this does not work in ZFC or other related systems of axiomatic set theory because this collection is too large to be a set, but it does work in type theory and in New Foundations and related systems. However, if we restrict from this class to those equinumerous with X that have the least rank, then it will work (this is a trick due to Dana Scott: it works because the collection of objects with any given rank is a set; see Scott's trick).