Add calculation of the number of peaks to DLL