The core dispute begins with Shulchan Arukh, Orach Chayim 489:3, who rules that one who prays with the community while it is still day may count with them but without a blessing, and only if he remembers again after nightfall does he bless and count again; but Arukh HaShulchan, Orach Chaim 489:8-12 reinterprets this as referring not to actual daytime but to bein hashmashot, twilight before the stars come out, since counting during real daytime would make the communal blessing meaningless.
Shulchan Arukh, Orach Chayim 489:2 states that if people erred and blessed on the counting during a cloudy day, they must return and count again once it grows dark, and that the punctilious wait until the stars actually emerge, which Mishnah Berurah 489:13 explains is because bein hashmashot is only doubtfully night, and although one may rely leniently on a rabbinic-level mitzvah in such a doubt, it is proper not to enter that doubt לכתחילה.
Biur Halacha 489:3 states explicitly that from plag hamincha onward, counting is not possible according to all opinions, and that the phrase 'while it is still day' in the Shulchan Arukh is understood by many Acharonim as referring only to the period from plag hamincha and later, when communities that prayed Maariv early were lenient to count together out of fear people would otherwise forget entirely.
Kitzur Shulchan Arukh Yalkut Yosef, Orach Chaim 489:18 rules that a congregation that finishes Maariv right after sunset without waiting for the stars, and fears part of the congregation will forget to count entirely, may count the omer with a blessing during bein hashmashot, since counting nowadays is only rabbinic and doubts in rabbinic law are resolved leniently, reinforced by joining Rabbi Yehuda's position that from plag hamincha the law of night already applies — but he stresses that before sunset itself, counting with a blessing is never permitted under any circumstance.
Kitzur Shulchan Arukh Yalkut Yosef, Orach Chaim 489:19 addresses one who prays Maariv early with the congregation near dusk and wishes to count immediately during bein hashmashot before going home: he should count with the congregation without a blessing while mentally stipulating that this counting fulfills his obligation only if he forgets to count later at home, so that if he remembers at night he may still count again with a blessing after the stars emerge, following his own stringent practice.
Peninei Halakhah, Zemanim 2:4 frames the whole question as one of doubt: since counting the omer nowadays is, according to most poskim including Shulchan Arukh, Orach Chayim 489:3, only a rabbinic mitzvah, one who counts during bein hashmashot is considered to have fulfilled the obligation according to most authorities, though many later Acharonim recommend stringently repeating the count without a blessing after the stars come out, to satisfy the position that counting today remains biblically required.
Teshuvot Maharshal 13:1 rules unambiguously that the omer must always be counted only after sunset, rejecting the practice of counting right after Kiddush on Friday while it is still broad daylight, since the extension of Shabbat sanctity that begins earlier does not transform daytime into halachic night for purposes of counting.
Revavos Ephraim (8:496) takes up the related question of whether one who recited the blessing on the count before nightfall must repeat it once it is fully dark, and discusses the Minchat Chinuch's own uncertainty about a minor who reaches majority during the days of counting.
Tzitz Eliezer (6:24) addresses the practical effect of an improperly conducted early count, holding that the initial days can still be joined together with the days counted properly afterward even though the intervening days do not themselves count, and that remembering the count near evening can still validate that day, allowing leniency when the beginning of the counting was not done correctly.