How many non-isomorphic extensions with kernel $S^1$ and quotient cyclic of order $p$? I want to determine how many non-isomorphic extensions (as group they are non-isomorphic) are possible of the form $1 \to \mathbb{S}^1 \to G \to (\mathbb{Z}_p)^k \to 1$, where $G$ is a compact lie group and $\Bbb{Z}_p$ is the cyclic group of order $p$? 
The only possible homomorphism $(\Bbb{Z}_p)^k \to Aut(\mathbb{S}^1)=\Bbb{Z}_2$ is the trivial one if $p\neq 2$. If $p=2$, then we have $(\Bbb{Z}_2)^k$ possible homomorphism $(\Bbb{Z}_2)^k \to \Bbb{Z}_2$. Then we have to calculate the group $H^2((\Bbb{Z}_p)^k; \mathbb{S}^1)$. I don't know how to proceed further. A detailed answer will be very helpful.
Thank you very much in advance.
 A: There is a short exact sequence of coefficients $\mathbb{Z}\rightarrow \mathbb{R}\rightarrow \mathbb{R}/\mathbb{Z}=S^1$.  This gives you a long exact sequence of cohomology groups.  For a finite group $Q$, $H^i(Q:\mathbb{R})=0$ for $i>0$, so the long exact sequence collapses to an isomorphism $H^2(Q;S^1)\cong H^3(Q;\mathbb{Z})$.  
You can use this to classify the isomorphism types of 1-dimensional compact non-connected Lie groups as in your question.  For $p$ odd, there is only the direct product for $S^1\rightarrow G\rightarrow C_p$.  For $p$ odd, there are two isomorphism types of group $S^1\rightarrow G \rightarrow (C_p)^2$, and there are two isomorphism types of group $S^1\rightarrow G\rightarrow (C_p)^3$.  Of course it gets more complicated as $k$ increases, and $p=2$ is more complicated than odd $p$.  
For $p=2$ there are already three groups $S^1\rightarrow G\rightarrow C_2$: the direct product, the orthogonal group $O(2)$, and the subgroup of the unit quaternions generated by the circle $\cos(\theta)+i\sin(\theta)$ and $j$.  
In the first chapter of my PhD thesis (available on ArXiv in an extended version as https://arxiv.org/abs/0711.5020) I classified 1-dimensional compact Lie groups with $p^k$ components for each prime $p$ and each $k\leq 3$.  The numbers that I got were 1, 3, 8 for $p$ odd and 3, 8, 29 for $p=2$.  I presume that this was already known and I did not try to publish it.  
A: Let's only consider central extensions (so we only miss a few cases when $p=2$). I denote by $C_p=\mathbf{Z}/p\mathbf{Z}$, to avoid confusion with $p$-adics.
So extensions are classified by $H^2(C_p^k,S^1)$. The commutator map yields a canonical homomorphism $\phi$ from $H^2(C_p^k,S^1)$ onto $\mathrm{Hom}(\Lambda^2C_p^k,S^1)$, and the latter is isomorphic to $C_p^{k(k-1)/2}$ (more canonically, the dual of $\Lambda^2C_p^k$). The kernel of this homomorphism consists of those 2-cocycle defining an abelian extension; since $S^1$ is an injective $\mathbf{Z}$-module the only abelian extension is split so $\phi$ is an isomorphism. Hence, the extensions are classified by $C_p^{k(k-1)/2}$, more precisely the space of alternating bilinear forms on $C_p^k$.
Next, the isomorphism class of the groups thus obtained are classified by the quotient of the latter by the action of $\mathrm{GL}_k(\mathbf{Z}/p\mathbf{Z})$. This quotient has exactly $1+\lfloor k/2\rfloor$ elements (number of types of alternating forms in dimension $k$, regardless of the field, including characteristic 2).  
Note: For $k=1,2,3$ this makes $1$, $2$, $2$ isomorphism types of Lie groups. That for $k=2,3$ it does not match with Ian's answer (3, 8) is because he also considers quotients of order $p^k$ that are not $p$-elementary.
