Earlier quoted context omitted.
Yes. Take the age of the universe, multiple by the rate of expansion to get the total size of the universe, then multiple by the average density of galaxies in the observable universe. There are some further complications, but at the root it is basic algebra.
Isn't the rate of the expansion of the universe increasing? And that assumes the observable universe is homogeneous, which it isn't
It is now, but up until a few billion years ago, it wasn't, it was decreasing. Many of the objects we currently see are far enough away that the light we are now seeing from them was emitted while the universe's expansion was still decelerating.
> that assumes the observable universe is homogeneous, which it isn't
No, the models cosmologists use do not assume the universe is homogeneous period. They only assume it is homogeneous on average, on large distance scales (roughly scales larger than the size of the largest galaxy clusters).