Well estimation rather than guesswork - it's based on evidence.
By the way there's as many stars in a single galaxy as grains of sand in a beach.
OK it depends on the beach but if you know the size of a beach and the size of a grain of sand you can work out the number of grains right? Easy? (Well a bit more complex there are things like packing fractions etc.)
Well a galazy is somewhat similar, you can work out the average interstellar distance and the size of the galaxy and come up with an answer in a similar way - you can even check it by weighting the galaxy - you know how fast it rotates and how it moves from spectrascopic measurements so you can see how much it weighs, you have a fair idea of the average weight of a star so you can make sure the answer makes sense. You can also do the same thing with the luminosity of a galaxy and get a similar answer.
As for the shape of our galaxy - remeber we don't just observe the sky with light telescopes, infrared telescopes see through dust and give us a much better picture