The algebra book I'm reading defines cardinality as:
The cardinality of a set $A$ is the equipotency class to which $A$ belongs to. It is indicated with $Card(A)$.
Two sets A and B are called equipotent if there exists a 1-1 mapping of A onto B. The equipotency class is composed by all the sets satisfying this condition.
The definition usually found of cardinality for example https://en.wikipedia.org/wiki/Cardinality
is that of the "number of elements of the set". I'm confused by the two notions I don't understand whether the cardinality is a set as defined in the book or a number. In case the two definitions are equivalent, if you can show me a way to prove it.
The equivalence relation for cardinality is bijection. That is, $A \sim B$ if there is a bijection between $A$ and $B$.
You have described an equivalence relation among elements of $A$. But cardinality is an equivalence relation among sets (in the universe of sets).