When studying Gauss Law, I learned the following two things: $$\oint \vec E \cdot d \vec A= Q/ \epsilon_0$$
That when using the equation above, the $Q$ has to be the amount charge "inside" the Gauss surface, because the $\vec E \cdot d \vec A$ caused by charges that are "outside" of the Gauss surface cancel out
That $E$ (roughly) means the density of lines(electric lines), $ \vec E \cdot d \vec A$ means the number of lines that are crossing a tiny segment, and that hence if we integrate $ \vec E \cdot d \vec A$, we get $Q/ \epsilon_0$, which is the number of lines. (That, in other words, Gauss Law is just a law stating a simple fact that (density)*(area)=(total number)
With those two things in mind, I looked at how the Gauss Law was used to find the electric field of a line charge. ( http://hyperphysics.phy-astr.gsu.edu/hbase/electric/elecyl.html ). But then I was confused: knowing that $E$ represents, the density of lines, and that the Gauss Law is just another way of saying that (density)*(area)=(total number), I presumably thought that $\vec E$ should refer only to the electric field caused by the charge "inside" the Gauss surface. (and not the net $\vec E$). However, I found that when using Gauss Law to find the electric field, the net$\vec E$ was considered, not the $\vec E$ caused only by charges inside the Gaussian surface. What is wrong here? Is there something that I am missing?
I found that Electric field and Gauss law this post asks a similar question, but it didn't seem to provide a satisfying answer, so I'm asking it here.