Passing through the layers, Dense Layer converts the columns of the Materix, from the number of x Vector to the number of ν Vector.
zi,j[1]=(x(i))T⋅wj[1]+bj[1]
ai,j[1]=g(zi,j[1])
You have to observe the shape.
The Activation is one-to-one correspondence. The shape do not change.
So. in a column, as neuron-wise, the same neuron
And, in a row, as Batch-wise, the same layer
Batch is the set of data, X Matrix
Cascaded Dense Layer
XT=Rnx×lx
W=Rlx×nνB=Rnx×nν
ZT=Rnx×nν
AT=Rnx×nν
I think that it is much more proper to count neurons using not length but number because neurons are indenpendent each other like the relations among the x vectors of the X matrix.