This is tough to calculate. Fortunately, we have a method to estimate this value. To do this, scientists can observe a region in the sky and count the number of galaxies (with the help of computers) in that region. This observed region is called as sample region. Scientists can then estimate the number of galaxies in the whole sky by multiplying the number of galaxies in the first case, with the number equivalent of how many such sample regions would fit in the entire sky. This method is called as Extrapolation. It is the process of estimating, beyond the original observation range, the value of a variable by its relationship with another variable.
Now, you would say that this value might be incorrect because all regions may not contain an equal number of galaxies. Yes, that might be true. Extrapolation allows us only to estimate. The preciseness of the value relies on the size of sampling region. And yes, the value is only valid for observable universe.
While estimates among different experts vary, an acceptable range is between 100 billion and 200 billion galaxies, Mario Livio, an astrophysicist at the Space Telescope Science Institute in Baltimore.
Also, you might be interested in reading this: NASA – Hubble Goes to the eXtreme to Assemble Farthest-Ever View of the Universe. The same method can also apply to find out the number of trees on the Earth or even finding the total number of runs that a team would make during a cricket match.