How can there be a finite number of galaxies in the universe?
Because the universe itself is finite.
A finite number simply means countable. Present science believes our universe to be finite.
To confuse things, however, there is another theory of the multi-verse. That is, the are some reputable astro-physicists who believe our universe is just one of an infinite number.
The problem is a simple yet not resolvable one. The math of today's physics allows for both possibilities but logic says only one can be true. This is where the unified field theory comes into play. That is, the math of the visible universe has to agree with the math of quantum physics. They do not. No one knows why although many suspect gravity to be the culprit.