Why are the number of pivot variables equal in A and the transpose of A? This was a fact used to prove the column rank of A was equal to the row rank of A in my textbook. 

But why is this true?
The number of pivots of $A$ is its column rank, say $k$. The
column rank of $A$ is equal to the row rank of A, which is the column rank of $A^T$.

Hence, $A^T$ must have the same number of pivots as $A$.
The number of pivots of $A$ is its column rank, say $k$. The
column rank of $A$ is equal to the row rank of A, which is the column rank of $A^T$.

Hence, $A^T$ must have the same number of pivots as $A$.