Input list must be finite.
If the input signal is empty, the offset is undefined.
List is scanned twice, but counting may be faster.
The sum of all histogram values is one less than the length of the signal.