Retina, 57 51 bytes
\d+
*
Lv`\b_+,_+
+`_,_
,
O^`
,,G`
^_
-_
/[^-]+/_`_+
Try it online! Link includes test cases. Only accepts positive integer lists, but will output -2
to 2
as required. Explanation:
\d+
*
Convert to unary.
Lv`\b_+,_+
+`_,_
,
For each overlapping pair of integers, get a substring representing the delta: _+,
for negative, ,
for 0
and ,_+
for positive.
O^`
Group identical substrings together and sort _,
first.
,,G`
Keep only one of each group, but if there is only one group, keep two of it.
^_
-_
If there was a _,
then prefix a -
sign.
/[^-]+/_`_+
Count the runs of _
s.
Edit: Saved 6 bytes by porting my answer to Retina 0.8.2 for 61 bytes and then backporting the golfs:
\d+
$*
M!&`\b1+,1+
+`1,1
,
O^`
+`¶.+¶
¶
^1
-1
((1+)|,|¶)+
$#2
Try it online! Link includes test cases. Only accepts positive integer lists, but will output -2
to 2
as required. Explanation: Retina 0.8.2 uses $*
(which produces 1
s) instead of *
(which produces _
s) for unary, needs to use M!&
instead of Lv
, and doesn't have an equivalent of ,,G
or _
(as a command), so I had to emulate those.