Rule 1: 1. Numbers inside a story
Three rules govern every number in the passage. 3–10: the number takes the opposite gender of the counted noun, which follows in the genitive plural: عَشَرَةُ بَنِينَ ten sons, ثَلَاثُ مَرَّاتٍ three times. 11–99: the counted noun is accusative singular: عِشْرُونَ جَمَلًا, ثَلَاثِينَ جَمَلًا. 100 and 1000: the counted noun is genitive singular: مِائَةُ جَمَلٍ. With a collective noun one uses مِنْ and the number agrees with the collective, which for إِبِلٌ camels is feminine: عَشْرٌ مِنَ الْإِبِلِ, مِائَةٌ مِنَ الْإِبِلِ. A number can also stand alone as a noun: زَادُوا عَشَرَةً they added ten, بَلَغَ عَدَدُهَا مِائَةً their number reached a hundred.
كَبِرَ لَهُ عَشَرَةُ بَنِينَ.
kabira lahu ʿasharatu banīna
Ten sons of his grew up.
اِبْنٌ is masculine, so the number has ة; بَنِينَ is the oblique sound plural.
اِقْتَرَعَ بَيْنَ الْوَلَدِ وَبَيْنَ عَشَرَةِ جِمَالٍ.
iqtaraʿa bayna l-waladi wa-bayna ʿasharati jimālin
He cast lots between the boy and ten camels.
Genitive عَشَرَةِ after بَيْنَ, then genitive plural.
ثُمَّ بَيْنَهُ وَبَيْنَ عِشْرِينَ جَمَلًا، ثُمَّ ثَلَاثِينَ.
thumma baynahu wa-bayna ʿishrīna jamalan, thumma thalāthīna
Then between him and twenty camels, then thirty.
Tens take accusative singular; the second number stands alone.
بَلَغَ عَدَدُ الْجِمَالِ مِائَةً فَذَبَحَ مِائَةَ جَمَلٍ.
balagha ʿadadu l-jimāli miʾatan fa-dhabaḥa miʾata jamalin
The number of camels reached a hundred, so he sacrificed a hundred camels.
مِائَةً alone takes tanwīn; مِائَةَ جَمَلٍ in iḍāfa does not. The alif of مِائَة is written but not pronounced.
وَقَعَتِ الْقُرْعَةُ عَلَى الْوَلَدِ فِي الْمَرَّةِ الْأُولَى وَالثَّانِيَةِ وَالثَّالِثَةِ.
waqaʿati l-qurʿatu ʿalā l-waladi fi l-marrati l-ūlā wa-th-thāniyati wa-th-thālithati
The lot fell on the boy the first, second and third time.
Ordinals agree like adjectives with the feminine مَرَّة.