Automatic counting and packaging of film capacitors