There are two misconceptions present in your explanation of the problem.
- $N$ is not number of dipoles, but their volumetric density
- $Q$ is not total charge, but equivalent charge at boundaries of the dielectric.
The idea is that (a) dielectric of the area $A$ and height $L$ polarized homogeneously along its height and (b) two plan-parallel plates of the area $A$, distanced by $L$ and with charges $N A p$ and $-N A p$ produce macroscopically the same electric field ($N$ is volumetric density and $p = q s$ is polarization of one dipole).
This effect can be relatively simply understood if you imagine that you have charges of volumetric density $N$ homogeneously distributed all along material. Initially positive and negative charges are on the same positions, all material is electrically neutral and polarization equals zero (picture left). Now you pull all positive charges for $s/2$ up and all negative charges for $s/2$ down (picture right), so you actually get total dipole moment $P' = N V p = N A L q s$.

Figure: red = positive charge, blue = negative charge, violet = neutral.
What is the effect of such movements? The bulk of dielectric material remains neutral in terms of charge, but you do get excess charge $Q = N A s q$ at the top and excess charge $-Q = -N A s q$ at the bottom of the dielectric ($A s$ is the volume at the top or bottom where only one type of charge is present).
The point of this simple derivation is that surface charge density $\sigma = \frac{Q}{A} = N s q$ equals polarization volumetric density $P = \frac{P'}{A L} = N q s$, i.e. $\sigma = P$. (Polarization density is by definition total dipole moment of the dielectric divided by its volume.)