How do scintillation detectors work, for gamma ray spectroscopy

So I understand what happens in the crystal with respect to the interactions and how the electrons in PMT are multiplied by hitting dynodes etc. But what I can't really seem to find any information on is how the circuitry in the scintillation detectors converts the electric pulses or voltages to counts?

I understand that the eV is the unit for the amount of energy of the electrons, but how is that being converted to count rate? I can only think that there is something converting the peak voltage in the electronic circuit to the count, so say 100KeV=2000 counts for example.

Is there a mathematical relationship, and is the conversion done within the circuitry or is it done by the software?

I have read something about a thing called a multi-channel analyser but I don't really understand what it does or how it contributes.

Converting voltage to counts really comes from calibration of the instrument, it has nothing to do with physics. I can give you a very intuitive example of piezo crystal and one can understand how calibration works. By definition, a piezo crystal is somethings which can develop voltage when given some mechanical stress. It is normally used to measure small forces. Now think you hold a piezo crystal in you hand and press it, then there will be some voltage developed across the crystal and you can measure it. But you don't know how much force you applied. Say for some unknown force F Newtons, piezo crystal gave V Volts which is measured by you. Now for calibration of piezo assembly you would need to measure the force F by some other means and then $$\frac{V}{F}$$ would really give you the voltage for 1 Newton of force if voltage varies linearly with force.