Is it true that the order of the group is a power of $2$ if every element has order $2$? I read in this old question that 

If $G$ consists only of elements of order 2, then $|G|=2^m$ for some
   $m$. 

But it's not clear to me. I tested the base case $G=\{a,b,ab,e\}$ but induction does not seem appropriate.

Assuming the statement is true, how does one go about proving this?

 A: No group consists only of elements of order $2$, because the identity always has order $1$ :-)
Leaving this nitpick aside, it's well-known that a group of exponent $2$ is abelian because
$$
a(ba)b = (ab)^2 = e = a^2 b^2 = a(ab)b
$$
(followed by canceling $a$ from the left and $b$ from the right), so if the group is finite it's isomorphic with $({\bf Z/2\bf Z})^m$ for some $m$.
JasonM's argument is still preferable because it generalizes to arbitrary primes: a finite group of exponent $p$ has order $p^m$ for some $m$, else some other prime $q$ divides the group order, and then Cauchy's theorem produces an element of order $q$.
A: I would like to propose a more direct answer without using Cauchy's theorem. First note that any group $G$ with only order 2 elements apart form the identity is abelian. Consider the minimum number of generators required to generate the group, say there are $n$ of these. Then every element of the group must be a product of these $n$ generators. Since the group is abelian, the order of the generators within a product is inconsequential and there are at most $\sum_{i=1}^n \binom{n}{i}$ of such products. Adding the identity element itself, this makes at most $2^n$ elements, so $|G|\leq 2^n$. But in fact all of the products must be distinct (and different from the identity) since otherwise we can always rearrange (multiplying by inverse generators and so forth) such that one supposedly independent generator is in fact a product of other generators. Thus $|G|=2^n$, where $n$ is the minimum number of generators of $G$.
A: For finite groups it's definitely true.  Suppose $|G|$ was divisible by an odd prime $p$.  By Cauchy's Theorem, $G$ contains an element of order $p$
I should add, clearly this does not hold when $G$ is an infinite group, since every non-identity element of $\mathbb{Z}_2^{\infty}$ has order $2$.  
A: Here's a counter-example where the order is infinite: an infinite product of copies of $\mathbb Z/2\mathbb Z$
A: Cauchy's theorem states that if a prime $p$ divides the order of a group $G$, then $G$ has an element of order $p$. In particular, if the order $|G|$ is a composite number which is not a power of $2$, because $|G|$ is divisible by a prime $p > 2$,  $G$ has an element whose order is not equal to $2$.  The proof of Cauchy's theorem would then prove your claim that if every non-identity element of a finite group $G$ has order 2, then the only prime dividing $|G|$ is $2$.
Note that the order of the identity group element is $1$.  So your assertion refers only to the non-identity group elements.
