Size functions are integer valued functions of two real variables which have been recently proposed for the representation and recognition of shape. A main limitation of the theory of size functions appeared to be the fragility of the produced representation with respect to edge fragmentation. In this paper it is shown that size functions can actually be defined without making assumptions on the topological structure of the viewed shape. Consequently, size functions can be profitably used even in the presence of fragmented edge maps. In order to demonstrate the potential of size functions for computer vision, a system for shape recognition is described and tested on two different domains. The very good performances of the system indicate that size functions are extremely effective for the analysis of shapes for which geometric models might be difficult to obtain.