Why is flux through a closed surface not infinite? The Electric field lines coming out of a charge are infinite, So the lines passing through a closed surface should be infinite , right?
 A: In my opinion, that definition of "flux" is a failed attempt to explain flux to outsiders, or a failed attempt to give a physical meaning of it. It is a very common definition, but I think it confuses people. 
The flux is actually simply
$$\Phi_{\vec{E}}=\iint_S \vec{E} \cdot d\vec{S}$$
And that integral can be whatever. That is what flux is. I wouldn't say that it is the number of lines passing. 
A: Yo can imagine a the electric field as an infinite number of "lines" coming out of a charge. In that case each line would represent an infinitesimally small portion of the field, since the total field is finite.
When you calculate the electric flux over a surface, you are summing an infinite number of elements each having an infinitesimally small value. So, the sum is finite. 
A: Electric field lines are a graphical "crutch" that is used to represent the real electric field, which is invisible.  In addition, there are rules for drawing the electric field lines:
1) The number of field lines is proportional to the charge of the particle that is generating or absorbing those lines.  Note that this number is arbitrary, but for charges of 2 Coulombs and 1 Coloumb, the number of field lines associated with a charge of 2 Coulombs would be twice the number of field lines associated with a charge of 1 Coulomb.
2) Field lines exit a positive charge and terminate on a negative charge.  Note that at the surface of a charge, field lines enter or exit at right angles to the surface.
3) If there is only one positive charge, the field lines extend to infinity.  If there is a negative charge associated with that positive charge, some or all field lines leaving the positive charge terminate on the negative charge.  If there is only one negative charge, field lines come from infinity and terminate on the negative charge.  
4) Field lines do not cross.
Regarding flux exiting or entering a surface that encloses a charge, the flux is proportional to the number of field lines ONLY, and is not influenced by the size of the surface.  Thus, for a 1 Coulomb charge that is surrounded by a spherical surface, the same flux exits or enters that sphere whether the sphere has a 1 m radius or a 1 km radius.  The number of field lines per square meter of the sphere's surface (aka, the flux density) is affected by the sphere's radius, but the total number of field lines penetrating that surface is solely determined by the amount of charge that the surface contains, and is NOT affected by the sphere's radius.
