What is the best way to find out the number of singularities (divide by zero) a particular function has over a particular interval? I am looking for a fomula: number of singularities = O[ f(x) ] where O is an mapping from the set of integrable functions to the positive natural numbers that I can express as a formula. Conviniently for me, the sum of the complex residues is simply equal to the integral of the function faround a closed curve in the complex plane. But I don't want the sum of the residues, I want the number of singularities on the real line. It seems like it should be easy to get there, but I need some help. If anyone cares, this is for a cosmological model of a universe that is homogeneously full of black holes.