The distribution of prime numbers has been one of the central topics in number theory. It has a deep connection with the zeros of the Riemann zeta function. The concept of "primes" also arises in other context. For example, in a compact Riemann surface, primitive closed geodesic cycles play the role of primes (as introduced by Selberg); while in a finite quotient of a building of higher dimension, for each positive dimension, there are primes of similar nature. In this talk we shall discuss the distributions of such primes and their connections with the analytic behavior of the associated zeta and L-functions.