Every time when I gazing at the dazzling night sky, I wonder that how many stars are there and how bright they are …
From Wikipedia, I know that we can use a metric called apparent magnitude (apmag) to describe the brightness of a star. The apparent magnitude of a celestial body is a measure of its brightness as seen by an observer on Earth, normalized to the value it would have in the absence of the atmosphere. The brighter the object appears, the lower the value of its magnitude would be.
In this problem, can you help me to count the stars and their average apmag in the sky?