"And the Lord said to Moses: Count every [firstborn] male, etc." (Numbers 3:40). Let our master teach us: An infant born at eight months — does one profane the Sabbath on his behalf? Thus our Rabbis taught: An infant born at eight months — one does not profane the Sabbath on his behalf, one does not cut his umbilical cord, one does not bury his placenta, and one does not move him from place to place; but his mother bends over him and nurses him, and one who moves him on the Sabbath is as if he moves a stone. If it is doubtful whether he is an eight-month child or a seven-month child, one does not profane the Sabbath on his behalf, one does not cut his umbilical cord, one does not bury his placenta, and one does not move him from place to place. But if it is a clear matter that he is a seven-month child, one profanes the Sabbath on his behalf, one cuts his umbilical cord, one buries his placenta, and one moves him from place to place. And why does one profane the Sabbath on behalf of an infant born at seven months? Because he is fit for life; but the one born at eight months is not at his full term and is not fit for life — therefore one does not profane the Sabbath on his behalf. They asked Rabbi Abbahu: From where do we know that one born at seven months lives? He said to them in the Greek tongue: "zeta" is "hepta," "eta" is "okto." And which is an eight-month child? Any whose hair and nails are not complete. Rabban Shimon ben Gamliel says: Any who does not live thirty days is not at his full term, but is a stillbirth. And on what did Rabban [Shimon ben] Gamliel base his view upon a matter of Torah? Because the firstborn are redeemed only after thirty days, [as it is said:] "And those to be redeemed, from a month old you shall redeem" (Numbers 18:16). Therefore the Holy One, blessed be He, said to Moses that the firstborn should be counted only from a month old. From where? From what was read on the matter: "Count every firstborn male among the children of Israel from a month old, etc." (Numbers 3:40).
Why Firstborn Are Counted From One Month and the Eighth-Month Child
Midrash Tanchuma Buber, Bamidbar 21:1
ויאמר ה' אל משה פקוד כל [בכור] זכר וגו' (במדבר ג מ). ילמדנו רבינו תינוק שנולד לשמונה חדשים מחללין עליו את השבת, כך שנו רבותינו תינוק שנולד לשמונה חדשים אין מחללין עליו את השבת, ואין חותכין את טיבורו, ואין טומנין את שלייתו, ואין מטלטלין אותו ממקום למקום, אבל אמו גוחה עליו ומניקתו, והמטלטלו בשבת כאילו מטלטל את האבן, ספק בן שמונה, ספק בן שבעה, אין מחללין עליו את השבת, ואין חותכין את טבורו, ואין טומנין את שלייתו, ואין מטלטלין אותו ממקום למקום, ואם דבר ברור הו שהוא בן שבעה, מחללין עליו את השבת, וחותכין את טיבורו, וטומנין את שלייתו, ומטלטלין אותו ממקום למקום, ולמה מחללין את השבת על ילוד שנולד לשבעה, לפי שהוא של חיים, אבל הנולד לשמונה אינו לחדשיו, ואינו של חיים, לכך אין מחללין עליו את השבת, שאלו לר' אבהו מנין לנולד בן שבעה שהוא חי, אמר להם בלשון יוונית זיטא איפטא איטא אקטו, ואיזהו בן שמונה, כל שאין שערו וצפורנו גמורין, רשב"ג אומר כל שאינו חי שלשים יום אינו לחדשיו אלא נפל הוא, ובמה סמכה דעתו של רבן [שמעון בן] גמליאל לדבר תורה, לפי שאין הבכורות נפדין אלא לאחר שלשים יום, [שנאמר] ופדויו מבן חדש תפדה (במדבר יח טז), לפיכך אמר הקב"ה למשה שלא יהו הבכורות נפקדים אלא מבן חדש, מנין ממה שקראו בענין פקוד כל בכור זכר בבני ישראל מבן חדש וגו'.