The invention discloses a method for recognizing and counting finished product varieties of feeds in warehouse in and warehouse out. The method comprises the steps of (1) arranging an electromagnetic wave absorbing strip on a packaging bag; (2) conveying; (3) adding magnetism to the electromagnetic absorbing strip; (4) emitting a group of electromagnetic waves with different wavelength; (5) recognizing the finished products of the feeds; (6) arranging the data, counting with the support of a camera, and uploading to a database for counting by class; (7) removing magnetism of the electromagnetic wave absorbing strip; (8) conveying the feeds. With the adoption of the method, the technical problems that the traditional manual recognition is error prone, the bar code recognition efficiency is low, and the RFID is inapplicable to the recognition of the packaging bag, can be overcome; the method has the advantages of being high in recognition capacity, accurate in recognition degree, low in cost of recognition devices, low in environmental pollution, and completely automatically recognizing and counting.