An automated image analysis method for quantification of the size and number of lymph nodes in surgical specimens of stage II colorectal cancer is presented. The quantification is made using routine histopathologic sections of lymph nodes that have been dissected by pathologists from resection specimens. The hematoxylin and eosin stained sections on slides are imaged with a standard image scanner. Each obtained image can contain multiple slides. The first task is to detect the slides. Then, the lymph nodes are detected and their size is assessed using K-means clustering and morphological image processing. The results are found to correlate well with results that have been obtained manually. The method has proven useful for predicting survival in stage II colorectal cancer.