Cardinality is number (i.e. the result of counting), but extended to infinite amounts.

To count a collection (or in mathematical terms, a set) of items is to assign a count (a natural number) to every item, starting at 1 and incrementing the count at every step, until all items have been assigned to. Clearly, for a finite set, this will end with the count being the total number of items.

For an infinite set, it turns out that this idea is still meaningful. Many infinite sets can be counted, not in the sense that we can assign a number to its elements one by one - which would take infinitely long - but in the sense that we can define a complete numbering all at once, that allows us, given a number, to simply look up or calculate what its number is.

A mathematician puts it this way: a set is called countable if a one-to-one mapping exists of its elements to the natural numbers.

Clearly, the natural numbers themselves are countable: map every number to itself. The rational numbers are also countable; every rational number is a division of integers, so we can order them by their increasing sum, as follows: 0, 1, -1, 2, -2, 1/2, -1/2, 3, -3, 1/3, -1/3, 4, -4, 3/2, -3/2, 2/3, -2/3, 1/4, -1/4, ...

The set of finite subsets of natural numbers is another example: we can enumerate them as follows: {}, {0}, {1}, {0,1}, {2}, {0,2}, {1,2}, {0,1,2}, {3}, {0,3}, {1,3}, ...

However, the real numbers are uncountable; this can be shown by means of Cantor diagonalization. The set of all subsets of the natural numbers is also uncountable; but a bijection between it and the real numbers exists.

So while the number of elements of an infinite set is always infinite, we still have a handle on its relative size: if a bijection exists between two sets, we say they have the same cardinality. In the special case of a finite set, its cardinality is just its number of elements.