  By using the structure and some properties of extraspecial and
generalized/almost extraspecial $p$-groups, we explicitly determine the number
of elements of specific orders in such groups. As a consequence, one may find
the number of cyclic subgroups of any (generalized/almost) extraspecial group.
For a finite group $G$, the ratio of the number of cyclic subgroups to the
number of subgroups is called the cyclicity degree of $G$ and is denoted by
$cdeg(G)$. We show that the set containing the cyclicity degrees of all finite
groups is dense in $[0, 1]$. This is equivalent to giving an affirmative answer
to the following question posed by T\'{o}th and T\u{a}rn\u{a}uceanu: ``For
every $a\in [0, 1]$, does there exist a sequence $(G_n)_{n\geq 1}$ of finite
groups such that $\displaystyle\lim_{n\to\infty} cdeg(G_n)=a$?". We show that
such sequences are formed of finite direct products of extraspecial groups of a
specific type.
