Counting Sheep

בארבעה פרקים העולם נדון, בפסח על התבואה, בעצרת על פרות האילן, בראש השנה כל באי העולם עוברין לפניו כבני מרון, שנאמר (תהלים לג) היוצר יחד לבם, המבין אל כל מעשיהם.ובחג נדונין על המים.

In four periods the world is judged: On Pesach, for the crops. On Shavuot, for the fruits of the tree. On Rosh Hashanah, all creatures pass before Him kivnei maron, as it says, "He that fashions yachad their hearts, that understainds all their actions." (Psalms 33:15) And on Sukkot, they are judged for the water.
בר"ה כל באי העולם עוברין לפניו כבני מרון:,מאי כבני מרון הכא תרגימו כבני אמרנא ריש לקיש אמר כמעלות בית מרון (אמר) רב יהודה אמר שמואל כחיילות של בית דוד אמר רבב"ח א"ר יוחנן וכולן נסקרין בסקירה אחת אמר ר"נ בר יצחק אף אנן נמי תנינא (תהלים לג, טו) היוצר יחד לבם המבין אל כל מעשיהם מאי קאמר אילימא ה"ק דברנהו לכולי עלמא ומייחד לבייהו כהדדי והא קא חזינן דלאו הכי הוא אלא לאו הכי קאמר היוצר רואה יחד לבם ומבין אל כל מעשיהם:
On Rosh Hashanah, all the world passes before him kivnei maron.
What is kivnei maron?
Here it is translated: kivnei imarna, sheep.
Reish Lakish says: Like the heights of Beit Maron.
Says Rav Yehuda in the name of Shmuel: Like the armies of the house of David.
Says Rava bar bar Hama in the name of R. Yohanan: And they are all overseen with one glance.
Says Rav Nahman bar Yitzchak: We can also understand that from the mishna--"He that fashions yachad their hearts, That understands all their actions." What does this mean? You might say it means that He created everyone with their hearts together as one. But we can see that is not the case! Rather, this is what it means. The fashioner sees their hearts all at once, and understands all of their actions.
אַשְׁרֵי הַגּוֹי אֲשֶׁר יי אֱלֹהָיו הָעָם בָּחַר לְנַחֲלָה לוֹ. מִשָּׁמַיִם הִבִּיט יי רָאָה אֶת כָּל בְּנֵי הָאָדָם. מִמְּכוֹן שִׁבְתּוֹ הִשְׁגִּיחַ אֶל כָּל יֹשְׁבֵי הָאָרֶץ. הַיֹּצֵר יַחַד לִבָּם הַמֵּבִין אֶל כָּל מַעֲשֵׂיהֶם.
Happy is the nation whose God is the LORD; The people whom He has chosen for His own inheritance. The LORD peers from heaven; He sees all the sons of men; From the place of His habitation He inspects all the inhabitants of the earth; He that fashions yachad their hearts, that understands all their actions.