Are the rank and the corank of the cohomologies of the given Tate module the same? Let $G$ be a Galois group of two kinds:


*

*$G=Gal(K_S/K)$ where $K$ is a number field and $K_S$ is a maximal $S$-ramified extension. ($S$ is a finite set of primes containing primes above $p$ and $\infty$).

*$G=Gal(K^{alg}/K)$ where $K$ is a finite extension of $\mathbb{Q}_l$. ($l$ is not necessarily different from $p$.) 
Suppose $T$ is a  $\mathbb{Z}_p[G]$-module such that $T\cong \mathbb{Z}_p^r$ for some $r$. Define $W:=\varinjlim_n T/p^nT$. 
My question is: $rank_{\mathbb{Z}_p}H^i(G, T) =corank_{\mathbb{Z}_p} H^i(G, W)$ for $i=0, 1, 2$? ($H^i(G, T)$ is a continuous cochain cohomology and  $H^i(G, W)$ is a Galois cohomology.)
 A: Your hypothesis $T \cong {\mathbf Z_p}^r$ is not precise enough. For convenience, I suppose that this is an isomorphism of topological $G$-modules, although this assumption is not necessary (1). We have continuous cohomology groups ${H_c}^i(G,T)$, with compact $T$, and Galois cohomology groups $H^i(G, W)$, with dicrete $W \cong T \otimes \mathbf Q_p /\mathbf Z_p$. Usually, the natural map ${H_c}^i(G,T) \to \varprojlim H^i(G,T/p^n)$ is surjective, with a kernel isomorphic to some $\varprojlim^1$ (2). But here, by the choice of your profinite group $G$ (both in the local and global cases), it is known that the groups $H^i(G,T/p^n)$ are finite, and it follows from this finiteness property that $rank_{\mathbf Z_p} {H_c}^i(G,T)= dim_{\mathbf Q_p} ({H_c}^i(G,T) \otimes{\mathbf Q_p})=corank_{\mathbf Z_p} H^i(G,T\otimes \mathbf Q_p /\mathbf Z_p )$ (3).
A convenient reference for all this is the book by Neukirch-Schmidt-Wingberg, "Cohomology of number fields", chap. II, §7, with (1) = the remark just before thm. 2.7.5, (2) = thm. 2.7.5, and (3) = coroll. 2.7.12. 
