Shouldn't the number of field lines through any surface be infinite if there is a charge present. Or is there a finite number of field lines from a unit charge?
What you have to understand is that field lines have no physical significance and are merely something we use to conveniently represent Electric Fields. It doesn't matter whether a million field lines or only one passes through your surface. They represents the exact same thing; as long as your field and configuration remain the same.
The flux of any vector field through a surface is the dot product of the Field and Area vectors. The definition which you state is not correct.
You should check out the answers to this question, they're great: Why does the density of electric field lines make sense, if there is a field line through every point?
Of course, The number of lines passing through any surface is infinite. But still we stick to our old concept of numb of field lines because it gives us intutive idea about how strong the field is there. It depends on you how much lines you draw around any charge but remember id 2q charge have 8 lines around then 4q charge deserve to be 16 lines. Electric field at some point depends on how dense the field is there. If we assume density to be number of lines per unit area then E.dA will be number of lines per unit area i.e E times dA i.e. area which simply defines flux thus flux equals number of lines passing through the surface. Thus number of lines is proportional to how intense the field is passing through given surface.