As far as I understand, electric field lines are only a way to "visualise" electric field. There is no specific rule for the number of field lines to be drawn for a particular field. If it is so, then how does electric flux represent the "number of field lines passing through a surface"? I have read about the analogy of measuring the "number of particles" that flow through a particular area in a fluid, but I am unable to make any connections between the two.
A mechanical force can be drawn with a line segment, to represent its module with length, but in electrical field, forces are not defined, lines are only "potential interaction forces", in the sense that, if you put a charge there a force will arise from the interaction, so fields lines have no definite ends (except sources-sink in charges) so how to represent intensity when the line length isn't available? Using number of lines is the preferred way. Why?
Because of electric flux, that is an important physical quantity, is the field passing through a given area in perpendicular direction, so representing intensity with lines is useful to see flux, counting lines per area let you visually calculate flux and compare the effect of different fields and areas.