The rank-nullity theorem tells you, that $$dim (Ker(T)) + dim(Im(T))=dim (V)$$
But
$$dim(Im(T))=rank(T)=rank(T^t)=dim(Im(T^t))$$
Thus, $dim(Im(T^t))+dim(Ker(T))=dim(V)$. Hence, you are left to check that $Im(T^t)\cap Ker(T)=\{0\}.$ This follows from the following computation. Let $v\in Ker(T)$ and $w\in Im(T^t)$, then we have $u\in V$ such that $T^t u=w$ and we get
$$ \langle v, w\rangle = \langle v, T^t u \rangle = \langle T v , u\rangle = \langle 0, u\rangle =0$$
Therefore, $Im(T^t)$ and $Ker(T)$ are orthogonal to each other and have trivial intersection.
This dimension formula can be obtained in the following way (as Ennar in his comment suggested): Let $X$ be a vector space and $V,W\subseteq X$ finite dimensional subvector spaces. First pick a basis $(u_i)_{1\leq i \leq l} $ of the vector space $V\cap W$. You can extend this basis to a basis $(u_1, \dots , u_l, v_1, \dots, v_m)$ of $V$. On the other hand, you can also extend this to a basis $(u_1, \dots, u_l, w_1, \dots, w_m)$ of $W$. Note that $(u_1, \dots u_l, v_1, \dots, v_n, w_1, \dots, w_m)$ forms a basis of $V+W$ (check this). Now we get
$$ dim(V+W)= l + n + m = (l+m) + (l+n) - l = dim(V) + dim(W) - dim(V\cap W). $$
This implies
$$ dim(V \cap W) = dim(V)+ dim(W) - dim(V+W). $$