Zero multiplied by infinity does not have to be zero, it can be anything between zero and infinity. Refresh your https://en.wikipedia.org/wiki/Calculus.
If it did, the same thing would happen not just for stars, but for all sorts of things. If you position a computer screen on a hiltop far enough away that, on a dark night, you can just make out whether it's on or off, then your eyes are getting about 6 photons per second. It doesn't matter whether these come from a million separate pixels, or from one light-bulb of similar total brightness.