A computer-implemented method for counting nuclei of a plurality of cells in a cell-containing sample, the method comprising: receiving a raw image of the cell-containing sample; transforming the raw image into a segmented image comprising one or more nuclei clusters on a contrasting background; for each of the one or more nuclei clusters: - obtaining a convex hull of the nuclei cluster; - locating any indentations on the nuclei cluster by comparing the nuclei cluster to the convex hull of the nuclei cluster; - for each nuclei cluster having one or more indentations: -- enhancing the size of each of the one or more indentations in the segmented image by elongating the tips of the indentations or by enlarging the size of the indentations; and -- splitting the nuclei cluster, at the indentations, into two or more nuclei, wherein splitting the nuclei cluster into two or more nuclei comprises: --- obtaining a distance transform of the nuclei cluster in the segmented image having enhanced indentations; and --- obtaining boundaries between two or more nuclei in the nuclei cluster by applying a watershed transform on the distance transform; -- calculating a first nuclei count for the nuclei cluster based on a tally on the indentations; and -- assigning the nuclei cluster to a cell among the plurality of cells; calculating a second nuclei count for each cell of the plurality of cells by totaling the first nuclei counts of its constituent nuclei clusters; and generating (816, 818) a result based on the second nuclei count for at least one of the plurality of cells. receiving a raw image of the cell-containing sample; transforming the raw image into a segmented image comprising one or more nuclei clusters on a contrasting background; for each of the one or more nuclei clusters: - obtaining a convex hull of the nuclei cluster; - locating any indentations on the nuclei cluster by comparing the nuclei cluster to the convex hull of the nuclei cluster; - for each nuclei cluster having one or more indentations: -- enhancing the size of each of the one or more indentations in the segmented image by elongating the tips of the indentations or by enlarging the size of the indentations; and -- splitting the nuclei cluster, at the indentations, into two or more nuclei, wherein splitting the nuclei cluster into two or more nuclei comprises: --- obtaining a distance transform of the nuclei cluster in the segmented image having enhanced indentations; and --- obtaining boundaries between two or more nuclei in the nuclei cluster by applying a watershed transform on the distance transform; -- calculating a first nuclei count for the nuclei cluster based on a tally on the indentations; and -- assigning the nuclei cluster to a cell among the plurality of cells; - obtaining a convex hull of the nuclei cluster; - locating any indentations on the nuclei cluster by comparing the nuclei cluster to the convex hull of the nuclei cluster; - for each nuclei cluster having one or more indentations: -- enhancing the size of each of the one or more indentations in the segmented image by elongating the tips of the indentations or by enlarging the size of the indentations; and -- splitting the nuclei cluster, at the indentations, into two or more nuclei, wherein splitting the nuclei cluster into two or more nuclei comprises: --- obtaining a distance transform of the nuclei cluster in the segmented image having enhanced indentations; and --- obtaining boundaries between two or more nuclei in the nuclei cluster by applying a watershed transform on the distance transform; -- calculating a first nuclei count for the nuclei cluster based on a tally on the indentations; and -- assigning the nuclei cluster to a cell among the plurality of cells; -- enhancing the size of each of the one or more indentations in the segmented image by elongating the tips of the indentations or by enlarging the size of the indentations; and -- splitting the nuclei cluster, at the indentations, into two or more nuclei, wherein splitting the nuclei cluster into two or more nuclei comprises: --- obtaining a distance transform of the nuclei cluster in the segmented image having enhanced indentations; and --- obtaining boundaries between two or more nuclei in the nuclei cluster by applying a watershed transform on the distance transform; --- obtaining a distance transform of the nuclei cluster in the segmented image having enhanced indentations; and --- obtaining boundaries between two or more nuclei in the nuclei cluster by applying a watershed transform on the distance transform; -- calculating a first nuclei count for the nuclei cluster based on a tally on the indentations; and -- assigning the nuclei cluster to a cell among the plurality of cells; calculating a second nuclei count for each cell of the plurality of cells by totaling the first nuclei counts of its constituent nuclei clusters; and generating (816, 818) a result based on the second nuclei count for at least one of the plurality of cells.