A method for solving the recognition of partially occluded parts is presented. It is based on the automatic generation of features from a set of primitive features which are configurations of pairs of fixed length segments of boundary edges of the parts. The procedure that creates the recognition features assigns a number in the range (0,1) that indicates the importance of the feature in the recognition strategy. This number is referred to as the feature's saliency. The method assumes that the parts that can occur in a scene come from a known set of parts. An example illustrates how automatically generated features can be used to count the number of identical parts in a heap.