Optical and Acoustic Phonons: Choice of Unit Cell According to my book, phonon dispersion relation for three dimensions, the number of acoustic phonons is 3 per unit cell while the number of optical phonons is 3(M-1) where M is the number of atoms in the unit cell. However, I am still confused since this seems to suggest that one can choose any unit and still get as many optical phonons as they want. Am I right to assume that this statement is only restricted to primitive unit cells only? Also, this seems to suggest even if the atoms and spring constants are of the same type we still get optical phonons. So what exactly causes optical phonons to happen?
 A: Your book is correct. In three dimensions, there are 3 acoustic phonons, and 3(M-1) optical phonons. You are also correct, in that since the choice of unit cell is arbitrary, the number of optical phonons will depend on the unit cell you choose.
In any case, one chooses the unit cell which is most convenient for the problem. In some cases, this is a primitive unit cell. In other cases, the convenient unit cell will be larger. If you happen to know anything about phonon (or electron) band structures, choosing a larger unit cell leads to a smaller Brillouin zone, and also to a folding of the phonon (or electron) bands on top of one another. This is what leads to more optical bands.
A question that you might have then, is what happens when you actually measure the phonon band structure, via, e.g. neutron scattering? Which band structure does one measure, if the band structure depends on the choice of unit cell, and the choice of unit cell is arbitrary?
Well, when you measure the phonon band structure via neutron scattering, what you're actually measuring is a quantity called the dynamical structure factor. Since I assume you just started solid state, I won't go into technical details. The gist is that the dynamical structure factor (in some hand-wavy sense) prefers a certain unit cell, and this is usually (at least in the cases I've dealt with) a primitive unit cell. As such, the phonon band structure inferred from measurements of the dynamical structure factor will typically correspond to the dispersion calculated in the natural primitive cell.
A: 
Am I right to assume that this statement is only restricted to primitive unit cells only?

Yes, this is correct - one really means primitive unit cell.

Also, this seems to suggest even if the atoms and spring constants are of the same type we still get optical phonons. So what exactly causes optical phonons to happen?

Of course, we can consider a bigger unit cell, containing several primitive unit cells. In this case we would formally get several phonon branches, but the gap at the edge of the Brillouin zone would disappear, i.e., the acoustic and optical branches in the figure below (taken from Wikipedia) would touch:

It is a useful exercise to consider a diatomic linear chain of atoms connected by springs and see how the gap vanishes for equal masses of the atoms in the unit cell. Taking the dispersion relation from Wikipedia, the gap is given by
$$
\omega_\pm^2 = K\left(\frac{1}{m_1}+ \frac{1}{m_2}\right)\pm 
K\sqrt{\left(\frac{1}{m_1}+ \frac{1}{m_2}\right)^2-\frac{4}{m_1m_2}}=\\
K\left(\frac{1}{m_1}+ \frac{1}{m_2}\right)\pm 
K\left(\frac{1}{m_1}- \frac{1}{m_2}\right)
$$
that is
$$
\omega_+^2-\omega_-^2=2KK\left(\frac{1}{m_1}- \frac{1}{m_2}\right)
$$
clearly vanishing for equal masses.
The situation is exactly the same as Brillouin zone folding when we are dealing with electron spectrum (borrowing figure from this thread):

By taking twice bigger cell, $a/2\rightarrow a$ one is obliged to make the Brillouin zone twice smaller $2\pi/a\rightarrow \pi/a$, so that the parts of the spectrum falling outside the Brillouin zone are folded to fit inside forming a second energy band (optical branch in case of phonons.) While for non-zero gap this operation is useful, it only leads to complications, in case when a smaller primitive cell is available.
Remark:
The thread suggested in the comments by @Inmaurer makes the same point:  Why isn't the dispersion of the phonon spectrum of two atomic basis with equal masses the same as for the one atomic basis?
