This sheet lays out an 8 ft (96") deck railing between post faces. It compares 1-1/2" wood with 3/4" metal, gives every mark from one hook of the tape, and checks the 4" sphere rule and post spacing.
1-1/2" wood: 18 balusters
96" ÷ (1-1/2" + gap) fits 18 balusters with 19 equal gaps of 3-5/8" (3.632"), 5-1/8" on centre.
From the post face the leading edges fall at 3-5/8", 8-3/4", 13-7/8", 19" and on in 5-1/8" steps. Buy 20 to allow 10% for splits and miscuts.
3/4" metal: 21 balusters
Thinner balusters need more of them: 21 at 3-5/8"+ gaps, 4-3/8" on centre. The first four marks: 3-5/8", 8-1/16", 12-7/16", 16-13/16".
1" metal or composite takes 20 at 3-5/8"; 3-1/2" flat pickets take 13 at 3-5/8".
This span needs a middle post
With 4x4 posts the centres would be 8' 3-1/2" apart, past the 6'-0" DCA 6 limit for prescriptive guard posts. Add 1 intermediate post (2 bays of about 46-1/4" clear), or use a railing kit rated for this section length.
The guard top sits at least 36" above the deck and the bottom rail less than 4" above it.