A method for detecting and counting articles in a system for sorting articles in batches, comprising the steps of: - providing detecting means (22a, 22b) arranged along a passageway for the articles, the detecting means (22a, 22b) being adapted to establish at least a scanning radiation beam at a cross section of the passageway; - passing articles past said detecting means (22a, 22b), the detecting means (22a, 22b) detecting an article upon sensing at least a partial interruption of the scanning radiation beam; and - obtaining a count of the detected articles through the passageway, wherein said detecting means (22a, 22b) include first and second detecting means (22a; 22b) arranged at a predetermined distance (d) from each other along the direction of travel of the articles, which first and second detecting means (22a; 22b) establish a respective scanning radiation beam on a first, respectively second scanning plane (A, B) at a corresponding cross section of the passageway, and in that the method comprises: - passing articles past said first and second detecting means (22a; 22b); - detecting at least a first predetermined reference section of the articles at each scanning plane (A, B); - calculating a travelling speed of each article based on the time used by said at least one reference section of the article to travel said predetermined distance (d) between the first and the second scanning planes (A, B); - detecting at least a second predetermined reference section of the articles, which is separate from the first reference section, at least at one of the first and second scanning plane (A; B); and - calculating a length of the article from the calculated travelling speed and by calculating the time used by the article to cross said at least one of said first and second scanning plane (A; B); characterized by the further step of: - obtaining a count of the article when the calculated length corresponds to a predetermined nominal length of an article. - providing detecting means (22a, 22b) arranged along a passageway for the articles, the detecting means (22a, 22b) being adapted to establish at least a scanning radiation beam at a cross section of the passageway; - passing articles past said detecting means (22a, 22b), the detecting means (22a, 22b) detecting an article upon sensing at least a partial interruption of the scanning radiation beam; and - obtaining a count of the detected articles through the passageway, wherein said detecting means (22a, 22b) include first and second detecting means (22a; 22b) arranged at a predetermined distance (d) from each other along the direction of travel of the articles, which first and second detecting means (22a; 22b) establish a respective scanning radiation beam on a first, respectively second scanning plane (A, B) at a corresponding cross section of the passageway, and in that the method comprises: - passing articles past said first and second detecting means (22a; 22b); - detecting at least a first predetermined reference section of the articles at each scanning plane (A, B); - calculating a travelling speed of each article based on the time used by said at least one reference section of the article to travel said predetermined distance (d) between the first and the second scanning planes (A, B); - detecting at least a second predetermined reference section of the articles, which is separate from the first reference section, at least at one of the first and second scanning plane (A; B); and - calculating a length of the article from the calculated travelling speed and by calculating the time used by the article to cross said at least one of said first and second scanning plane (A; B); - obtaining a count of the article when the calculated length corresponds to a predetermined nominal length of an article.