"You have four female students and four male students."
Translation:Tu quattuor discipulas et quattuor discipulos habes.
Discipulae = female students as a subject, or THEY (the female students). Discipulas = female students as an object, or THEM (the female students.)
In Latin , there's more than one type of object. Discipulas (accus. plur.) is either the direct object of the verb, as in "I have four (female) students," or it's the object of prepositions that require accusative, such as "I run towards ( = ad) the female students."
Other prepositions will require the ablative (cum discipulis, with the students).
Some structures will require the dative (Discipulis fabulam narro, I tell a story to the students).
If the following is incorrect, please let me know.
magistra, discipula - female nominative singular
magistrae, discipulae - female nominative plural
magistram, discipulam - female accusative singular
magistras, discipulas - female accusative plural
magister, discipulus - male nominative singular
magistri, discipuli - male nominative plural
magistrum, discipulum - male accusative singular
magistros, discipulos - male accusative plural
For some reason, Latin has "magister" rather than (incorrect) "magistrus". Otherwise, the above would show a lot of regularity with male tending toward 'u', 'i' and 'o' endings where female tends toward 'a' endings.
I think the construction with "dative + esse" (with the object becoming the grammatical subject of the sentence, hence "discipulae/discipuli" in the nominative in that case) should be accepted to express ownership or relationship:
"Tibi sunt quattuor discipulae et quattuor discipuli." (Reported)
In this sentence, students are an object (THEM) and not a subject (THEY). Thus, the accusative plural form is required.
"You have four female students and four male students." In this sentence, YOU = the subject, the one who HAS something, namely the students: you have THEM.
Here is a plain-English overview of what the cases are and how they work:
Latin cases, in English
Adjectives must agree in gender, number, and case with the nouns they modify, but they have their own declensions. Sometimes you get lucky and the adjective just happens to follow the same declension as the noun, but that is not a guarantee.