Cardinality is the notion that answers the question "How many?", and is one of the origins of the concept of a number which, in turn, is one of the origins of mathematics. However, the concept of cardinality can be understood without having names for numbers, without a developed system of numerals:
Consider a group of persons in a room. When they sit down it is immediately clear if there are enough seats available: If some seats are not occupied then there are more seats than persons, if some do not find a seat there are less, and if all can sit down and no seat stays empty then there are as many persons as there are seats.
In the same way, the question "Fewer than, as many as, or more than?" can be answered without counting by establishing a pairwise correspondence.
While pairwise correspondence works well for finite sets, there are problems with infinite sets. "Obviously", there are much fewer perfect squares (1,4,9,16,25,...) than there are natural numbers (1,2,3,4,5,6,...), but (equally obviously) they can nevertheless be grouped into pairs: (1,1),(2,4),(3,9),(4,16),... This observation is known as Galileo's paradox (though it is older). The modern view is that this is not a paradox at all, but a characteristic property of infinite sets — as long as there exists a pairwise correspondence the sets have equally many elements.
Georg Cantor, when investigating subsets of the real line, discovered that using "infinite" for all numbers that are not finite is not precise enough: He showed that there is no pairwise correspondence between the natural and the real numbers, i.e., that there are more real than there are natural numbers — the real numbers are not countable.
After this discovery, Cantor began a detailed study of cardinality. Based on pairwise (or one-to-one) correspondence, he defined cardinal numbers, and in order to deal with the "sequence" of cardinal numbers (ordered by size) he defined ordinal numbers, as well. For infinite cardinal and ordinal numbers he coined the term transfinite numbers, in order to avoid the traditional and undefined term "infinite".