The part that you are having trouble with essentially boils down to understanding the construction of a Booolean Algebra from a partial order.

I don't have Jech with me right now, so this answer is off the top of my head. I will make corrections later if necessary.

When one defines the Boolean algebra $B(P)$ corresponding to a separative partial order $P$, the members of the Boolean algebra are just taken to be arbitrary formal Boolean sums of antichains of the partial order. (In case $P$ is not separative, one must first take the separative quotient, but many common forcing notions are actually separative, so for simplicity assume $P$ is separative when first trying to understand this.)

A Boolean sum corresponds to a logical disjunction -- that is, if $p$ forces $\phi$ and $q$ forces $\psi$, then $p+q$ forces $\phi$ or $\psi$. But we take arbitrary Boolean sums -- so infinite sums are allowed in addition to finite ones.

One then shows that the collection of formal Boolean sums of antichains of $P$ satisfies the axioms for a Boolean algebra, which involves checking a lot of details.

So the number of antichains in $P$ equals the number of elements in $B(P)$. In the case that $P$ satisfies the countable chain condition (which should really be called the countable antichain condition in this context, but is not for historical reasons), then every antichain of $P$ is at most countable, and so the size of the Boolean algebra equals the number of at most countable antichains in $P$ (this includes the finite antichains, not just the countably infinite ones, but the number of countably infinite antichains is the same as the number of at most countably infinite antichains.)

But the question in your mind might be, why does it suffice to just consider formal Boolean sums of antichains, rather than of arbitrary subsets of P? After all, when we're working in the Boolean algebra, we want to be able to take Boolean sums of arbitrary subsets of $B(P)$ that may not be antichains. The idea is the same as the reason why considering only antichains suffices to define nice names. Suppose a subset $X$ of $P$ is not an antichain. Let $q \in X$ be stronger than some other element of $X$. Let $Y = X - {q}$. Then the Boolean sum of $Y$ is forcing equivalent to the Boolean sum of $X$. Repeat this process recursively until we get an antichain whose Boolean sum is equivalent to that of $X$. So we see that considering only antichains suffices in the construction of the Boolean algebra.