Yup, +2 for each adjacent unit be it archer or scout. However this bonus is ignored by archers shooting at you which is one reason archers are OP.
The square promotion of spears means they provide +4 not +2
Flanking bonuses also work the same way, ranged can help toward other units flanking by providing +2 but get no flanking benefit with their shots
Beelining Military tradition is often a good move.