We don't know, but let's do some calculations in our spare time.
The (observable) universe contains between a few hundred billion and perhaps 2 trillion galaxies, mostly small and faint, with a total of stars estimated to be somewhere between ten and a thousand trillion. Let's take a middle ground: 200 trillion stars.
Now, taking roughly as a model the stellar population of our galaxy, of these:
75% of the stars in the universe are of class M, or red dwarfs (giants, of any class, are less than 1% and I leave them out: those orbiting near them were mostly swallowed up or roasted).
Thanks mainly to the Kepler space telescope, we know that small planets are the norm around red dwarfs, on average at least one per star, probably two or three.
So in total 150 trillion planets (at least) orbiting red dwarfs.
Roughly one in five red dwarfs, based on current observations, hosts an Earth-sized planet in the habitable zone, although flares from these stars, especially when young, can erode their atmospheres.
So, for M-class stars alone, we have approximately 30 trillion potentially habitable planets.
12% of the stars in the universe are class K, or orange dwarfs.
Planets are the rule here too, and for K and G stars analyses of Kepler and Gaia data indicate roughly between a third and a half of stars have a rocky planet in the habitable zone.
In this case, therefore, there are about ten trillion potentially habitable planets and a non-negligible portion of these are to be considered, at least virtually, a superhabitable planet.
7.5% of the stars in the universe are class G, or yellow dwarfs, like the Sun.
Same goes for orange dwarfs: roughly one-third to one-half with a rocky planet in the habitable zone.
6 trillion potentially habitable planets.
3% of the stars in the universe are class F, or yellow-white stars.
Data is scarce here, because the habitable zone is further away and the planets orbiting it are more difficult to spot; let's say, very roughly, one in ten.
600 trillion potentially habitable planets.
0.6% of the stars in the universe are class A, or white stars.
They live a maximum of a couple of billion years, and we know of few planets around them; let's estimate, again by guess, 1% with at least one planet in tow, and, of these, 0.1% with a potentially habitable one.
12 trillion potentially habitable planets.
0.1% of the stars in the universe are class B, or blue stars.
B-type stars simply have too short an evolutionary lifespan to be able to hope to host habitable planets in orbit.
There may be some exceptions, especially among the less massive ones, but I am unable to quantify any numbers in this regard.
In any case, habitability is practically (almost) impossible.
Number of potentially habitable planets unknown, likely extremely small.
Finally, there remain the very rare class O stars and, outside this classification, a number of other objects and stellar remnants: young stellar objects, subdwarfs, white dwarfs, Wolf-Rayet stars, pulsars, magnetars, black holes, etc.
Analyzing them one by one is out of the question, it would take us a month, and we have even found a few planets around them (the first confirmed exoplanets, in 1992, orbit a pulsar), but they weigh little in the total and I'll leave them out of the count.
Habitability is highly implausible, but obviously not impossible.
To sum it all up, we can hypothesize the presence of ~200 trillion planets (at least) in the entire (observable) universe, that is, at least one per star.
Of these, about fifty trillion are potentially habitable or even superhabitable.
I'll leave out the moons: in the Solar System, some are among the most promising places ever, from Europa to Enceladus, but around other stars we haven't confirmed even one yet.
So, we conclude that there are about fifty trillion worlds where life (potentially) could develop, at least as far as we know today. The problem with these calculations, however, and this is why I initially said "in passing," is that we only know of life on Earth.
We assume it needs water, protection from radiation, etc., but the truth is we know absolutely nothing about the Universe. My estimate, though highly simplified, is nevertheless clear: in a galaxy like ours, with at least 100 billion stars, there are something like 25 billion places where life could potentially flourish. One planet for every four stars.