The enumeration of cells in fluids by flow cytometry is widely used across many disciplines such as assessment of leukocyte subsets in different bodily fluids or of bacterial contamination in environmental samples, food products and bodily fluids. For many applications the cost, size and complexity of the instruments prevents wider use, for example, CD4 analysis in HIV monitoring in resource-poor countries. The novel device, methods and algorithms disclosed herein largely overcome these limitations. Briefly, all cells in a biological sample are fluorescently labeled, but only the target cells are also magnetically labeled. The labeled sample, in a chamber or cuvet, is placed between two wedge-shaped magnets to selectively move the magnetically labeled cells to the observation surface of the cuvet. An LED illuminates the cells and a CCD camera captures the images of the fluorescent light emitted by the target cells. Image analysis performed with a novel algorithm provides a count of the cells on the surface that can be related to the target cell concentration of the original sample. The compact cytometer system provides a rugged, affordable and easy-to-use technique, which can be used in remote locations.