Suppose we are given a finite group $G$, and suppose we know the order of $G$ as well as the orders of each of its elements. Does this information alone uniquely determine the group up to isomorphism? What if we add extra hypotheses about $G$ (solvable, simple, etc)? If not, can we at least extract some useful information regarding its structure?
For example, if $|G| = 8$ and $G$ contains three elements of order $2$ and four elements of order $4$, then I know $G \cong \mathbb{Z}_4\times\mathbb{Z}_2$.
In the following, denote by $a_n(G)$ the number elements satisfying $x^n = 1$ in $G$ ($n$ any integer). Now two groups $G$ and $H$ have the same order sequence (ie. same order, and the same number of elements of each order) if and only if $a_n(G) = a_n(H)$ for all integers $n$. To see this, you can use the fact that $a_n(G) = \sum_{d \mid n} o_d(G)$, where $o_d(G)$ is the number of elements of order $d$ in $G$.
Suppose that $G$ and $H$ have the same order sequence. As Alexander mentions in his answer, this does not imply that $G$ and $H$ are isomorphic.
But it is true if we assume that $G$ is simple! This follows from a stronger result that was proven in 2009. See the slides here for more information.
The proof of the above statement uses the classification of finite simple groups (not surprising).
There are a few properties that are determined by order sequences, and many that are not.
Proof: This is a common lemma. If $a_n(G) \leq n$ for all integers $n$, then $G$ is a cyclic group. See answers in this question.
Proof: A finite group $G$ is nilpotent if and only if it every Sylow subgroup of $G$ is normal. Let $p$ be a prime divisor of $|G|$ and $p^\alpha$ the order of a Sylow $p$-subgroup in $G$. Then $G$ has a normal Sylow $p$-subgroup if and only if $a_{p^{\alpha}}(G) = p^\alpha$.
Counterexamples for some properties:
There is a theorem of Frobenius (1895) which states that if $n$ divides the order of $G$, then $a_n(G)$ is a multiple of $n$. Frobenius conjecture states that if $n$ divides the order of $G$ and $a_n(G) = n$, then $G$ has a unique subgroup of order $n$. This conjecture was proven in 1991, and the proof uses the classification of finite simple groups. Hence
Using Frobenius conjecture, we can also deduce the following.
Proof: (from this article) Suppose $G$ has order $|G| = p_1^{a_1} \ldots p_t^{a_t}$, where $p_1 < p_2 < \ldots < p_t$ are primes. We know that $|G| = |H|$. Furthermore, since $G$ supersolvable, we see that $a_n(G) = n$ for every $n = p_i^{a_i} p_{i+1}^{a_{i+1}} \ldots p_t^{a_t}$. Hence $a_n(H) = n$ for every such $n$ since $G$ and $H$ have the same order sequence. By Frobenius conjecture, $H$ has a unique subgroup of order $p_i^{a_i} p_{i+1}^{a_{i+1}} \ldots p_t^{a_t}$ for every $i$ and thus $H$ must be solvable.
So what about when $G$ is solvable? Can we deduce that $H$ must be solvable? Nobody knows. This is an open problem, due to J. G. Thompson (Kourovka Notebook, 12.37).
Finally, let me mention that there are some conditions on the order sequence which force solvability. For example, if $a_n(G) \leq 7n$ for all integers $n$ dividing the order of $G$, then $G$ is solvable. Note that when $G = A_5$, we have $a_n(G) \leq 8n$ for all $n$ dividing the order of $G$.