Given an analytic function f and a Jordan curve gamma that does not pass through any zero of f, we consider the problem of computing all the zeros of f that lie inside gamma, together with their respective multiplicities. Our principal means of obtaining information about the location of these zeros is a certain symmetric bilinear form that can be evaluated via numerical integration along gamma. If f has one or several clusters of zeros, then the mapping from the ordinary moments associated with this form to the zeros and their respective multiplicities is very ill-conditioned. Mie present numerical methods to calculate the centre of a cluster and its weight, i.e., the arithmetic mean of the zeros that form. a certain cluster and the total number of zeros in this cluster, respectively. Our approach relies on formal orthogonal polynomials and rational interpolation at roots of unity. Numerical examples illustrate the effectiveness of our techniques. AIMS subject classification: Primary 65H05; Secondary 65E05.