Our teacher, the Rema, wrote in section 1 that there are those who say that if the congregation prayed Maariv and it is still very much day, she cannot perform a bedikah or put on white garments to begin counting from the following day, since the congregation has already made it night [and even though she has not yet prayed Maariv. Shach]. And there are those who say it is permitted even if the congregation has made it Shabbat. And we are accustomed to be careful ab initio, but ex post facto there is no concern. And some women are accustomed that if she performed the hefsek before Barechu and saw a ketam or blood again during the days of her counting, then they perform the hefsek even after Barechu if she became disqualified close to evening, and they consider this matter as ex post facto, and one should not protest against them, for they received this from some sage who instructed them, and it is a custom of the meticulous. Thus far his words. And there is one who says that when she also prayed Maariv, even ex post facto it is not effective [Shach, subsection 4 in the name of his father]. And there are those who say there is no difference [ibid.]. And there is one who says to follow this until twenty-four hours, and when the day is long we consider day and night equal, and therefore after six hours past midday we consider it night [ibid.]. And already the great Acharonim have rejected these words, and their mind is not at ease with the essence of this law, for what is the connection between prayer and her counting? And is it so that if they pray Maariv on Shabbat before nightfall, melakhah would be permitted? Heaven forbid! And so too regarding all the Festivals and Yom Kippur, and so too on the eve of Pesach regarding the eating of matzah, it must be specifically at night even though they prayed while it was still day. And the Maharshal in a responsum [cited in the Taz, Orach Chaim, end of siman 668] wrote that this which we add from the profane to the holy is not for the purpose of making it night; see there. And we do not find this stringency in the poskim except regarding mourning later in siman 375, and even there the Acharonim were lenient, and also mourning is not comparable to a niddah, as is explained there [in the Shach, see there]. Therefore, among us the simple custom is that until nightfall she may perform a bedikah and begin counting from the following day, and also on the eve of Shabbat she should do so. And all the more so regarding the matter that we do not begin counting until the sixth day from her intercourse, as will be explained, and she saw after the Maariv prayer while it is still day, that she can include it in the sum of the six days [and this is the intent of the Taz, subsection 1 in the name of the Rashal, though he did not explain it well, as wrote the Dagul Mervavah and the Sidrei Taharah, and they and other great ones agreed to all the matters we have explained].
כתב רבינו הרמ"א בסעי' א' די"א דאם התפללו הקהל ערבית ועוד היום גדול אינה יכולה לבדוק או ללבוש לבנים ולהתחיל ולמנות מיום המחרת מאחר דהקהל עשו אותו כבר לילה [ואע"פ שהיא לא התפללה עדיין ערבית. ש"ך] וי"א דמותר אפילו עשו הקהל שבת ונוהגין לכתחלה ליזהר ובדיעבד אין לחוש ומקצת נשים נוהגות שאם פסקה קודם ברכו וחזרה לראות כתם או דם תוך ימי ספירתה אז מפסיקין אפי' לאחר ברכו אם נתקלקלה סמוך לערב וחושבין דבר זה לדיעבד ואין למחות בידם כי כן קבלו מאיזה חכם שהורה להם והוא מנהג ותיקין עכ"ל ויש מי שאומר דכשגם היא התפללה ערבית גם בדיעבד אינו מועיל [ש"ך סק"ד בשם אביו] וי"א דאין חילוק [שם] ויש מי שאומר לילך בזה עד כ"ד שעות וכשהיום גדול חשבינן יום ולילה שוים ולכן אחר ו' שעות לאחד חצות היום חשבינן לילה [שם] וכבר גדולי האחרונים דחו דברים אלו ואין דעתם נוחה מעיקר דין זה דמה עניין תפלה לספירתה ואטו אם יתפללו בשבת ערבית קודם הלילה יהיה מותר במלאכה חלילה וכן בכל המועדים ויוה"כ וכן בע"פ באכילת מצה הוי דווקא בלילה אף ע"פ שהתפללו מבעוד יום ומהרש"ל בתשו' [הובא בט"ז א"ח ס"ס תרס"ח] כתב דהא דמוסיפין מחול על הקדש לא לעניין לעשותו לילה ע"ש ולא מצינו בפוסקים חומרא זו רק באבילות לקמן סי' שע"ה ואף גם שם הקילו האחרונים וגם אבילות לא דמי לנדה כמבואר שם [בש"ך ע"ש] ולכן אצלנו המנהג הפשוט דעד הלילה בודקת ומתחלת למנות מיום המחרת וגם בע"ש תעשה כן וכ"ש לעניין שאין מתחילין למנות עד יום ו' לשימושה כמו שיתבאר וראתה אחר תפלת ערבית ועדיין הוא יום שתוכל לחושבו בסכום הששה ימים [וזהו כוונת הט"ז סק"א בשם רש"ל ולא ביאר יפה כמ"ש הדגמ"ר והס"ט והם ועוד גדולים הסכימו לכל הדברים שבארנו]: