Cell lineages of nematodes are completely known: the adult male of Caenorhabditis elegans contains 1031 somatic cells, the hermaphrodite 959, not one more, not one less; cell divisions are strictly deterministic (as in the great majority of invertebrates) but so far nothing is known about the mechanism used by cells to count precise numbers of divisions. In vertebrates, each species has its invariable deterministic numbers of somites, vertebrae, fingers, and teeth: counting the number of iterations is a widespread process in living beings; nonetheless, it remains an unanswered question and a great challenge in cell biology. This paper introduces a computational model to investigate the possible role of satellite DNA in counting cell divisions, showing how cells may operate under Boolean logic algebra. Satellite DNA, made up of repeated monomers and subject to high epigenetic methylation rates, is very similar to iterable sequences used in programming: just like in the "iteration protocol" of algorithms, the epigenetic machinery may run over linear tandem repeats (that hold cell-fate data), read and orderly mark one monomer per cell-cycle (cytosine methylation), keep track and transmit marks to descendant cells, sending information to cell-cycle regulators.