How does the inner ear encode sound intensity? Different areas of the inner ear (the cochlea) are sensitive to different acoustic frequencies. Hence, the cochlea basically performs a fast Fourier transform on the audio signal. This spectral information is subsequently sent to the auditory cortex. But how does the cochlea encodes the intensity of an acoustic stimulus?
Short answer
Hair cells in the cochlea can code sound intensity via the amount of neurotransmitter they release. Higher sound levels result in more neurotransmitter release and in turn to higher firing rates in the spiral ganglion cells of the auditory nerve. 

Background
Sound waves are picked up by the mechanoreceptors in the inner ear: the hair cells. Hair cells release the excitatory neurotransmitter glutamate. Dependent on the direction of the deflection of the hairs (stereocilia) on the hair cells, the hair cell releases more neurotransmitter (activation) or less (inhibition) than at its resting state (Fig. 1). The released glutamate activates the primary sensory neurons that connect to the hair cells, namely the spiral ganglion cells (SGCs). The axons of the SGCs combine to form the auditory nerve (Fuchs, 2005).  


Fig. 1. Hair cells are activated when their stereocilia are bent in one direction (depolarization) or inhibited when the cilia bend to the other direction (hyperpolarization). source: Yanowski

The hair cell cilia contain mechanoreceptor proteins, that open or close, dependent on the direction in which the cilia bend (Fig. 2).


Fig. 2. Mechanoreceptors in the cochlear hair cell. source: Hudspeth (2014) 

Because sound waves have sinusoidal shapes, hair cells undergo cycles of activation and inhibition, closely following the input waves. Louder stimuli cause the cilia to bend further. This causes larger responses in the hair cell and larger amounts of neurotransmitter to be released in the depolarizing phase of the auditory stimulus. This in turn leads to higher spike rates in the spiral ganglion cell axons (Fuchs, 2005). Spike rate in the spiral ganglion cells are thought to primarily encode sound intensity (Heil et al., 2011)

A secondary mechanism of loudness coding may be related to the fact that increased sound levels activate a larger area in the cochlea, due to the low-frequency tail (Kiang &amp; Moxon, 1974). Hence, more neurons start firing at higher sound levels when the tone frequency is the same. However, although it is a plausible mechanism, it is a secondary intensity code, if any.   

References
- Fuchs, J Physiol (2005); 566(1): 7–12
- Heil et al., J Neurosci 2011; 31(43): 15424-37
- Hudspeth, Nature Rev Neurosci (2014); 15: 600–14
- Kiang &amp; Moxon, JASA 1954; 55(3): 620-30