Entropy as a state function independent of the path
Entropy is indeed a state function, and thus depends only on the state of the system.  Hence it doesn't matter how you get from state A to state B, the entropy change will be the same.  The analogy would be that it doesn't matter which path you use to get from the base of a mountain to the summit, your elevation change will be the same.  This is because altitude is a state function: your altitude depends only on how high you are (the state of your system), not how you got there.

But, since $dS= \frac{\text{đ}q_{rev}}{T}$, one can calculate the entropy change by integrating along a path connecting the two states, but that path must be reversible.  I.e., it doesn't matter if the way the system changed from A to B was reversible or irreversible.  $\Delta S$ will be the same.  However, to calculate $\Delta S$ for that change from A to B, you need to integrate along some reversible path that connects A to B.  

Also, it is possible to sum the effects of an infinite number of infinitely small steps.  That's what happens when we do an integration.  [More precisely, in an integration we calculate the sum in the limit as the step size goes to zero and the number of steps goes to infinity.]  For a graphical representation of this, take a look at the graphics in Wikipedia's entry on Reimann sums (https://en.wikipedia.org/wiki/Riemann_sum), and imagine what happens in the limit as the bar width goes to zero.

The comments by Andrew, and Chet Miller, are both useful additions.  Further expanding on Andrew's comment: The system's net change isn't affected by the path.  This means that, to distinguish between the result of making a change in a system by a reversible vs. irreversible path, we need to look at differences in effects upon the surroundings.