Counting the number of visible stars