Here are the basic rules:
Numbers of
You will use “numbers of” when referring to something in high quantities in the plural. This will accompany verb agreement where applicable. Consider the following examples:
There are huge numbers of people in the crowd.
When we arrived at the show, the numbers of people present were overwhelming.
Number of
Since “number of” suggests singular usage, you will apply it when there is only one noun in question. However, it will also suggest a kind of plurality. For instance:
I have told you a number of times that I don’t want to go camping.
No one can ever know the whole number of historical data in their lifetime.
Did you see the number of products they have at the fruit stand?
The number of crystalline salt grains is uncountable.
That second rule can be a bit tricky. Think of it like this: it's used when referring to a singular something involving multiple somethings.
I have told you a number of times that I don’t want to go camping. (Singular something: the act of telling you.)
No one can ever know the whole number of historical data in their lifetime. (Singular something: the non-discrete/uncountable reference to "historical data." See Note #1.)
Did you see the number of products they have at the fruit stand? (Singular something: the fruit stand. See Note #2.)
The number of crystalline salt grains is uncountable. (Singular something: the non-discrete/uncountable salt grains. See Note #1.)
So you're correct that it's important to identify the object being discussed. Here's your first example:
Universities should accept equal numbers of male and female students in every subject.
The object is plural, "students." The words male and female are adjectives modifying students. Now let's look at your second example.
Considering these, the idea of determining the number of males and females in every subject is justifiable.
What's being discussed? Idea. Perhaps more explicitly, it's the process of making the determination that's the object — and it's singular. The fact that the process involves analyzing something plural doesn't affect how we use the phrase "number of."
Note #1
In English, when we refer to something that's "too big to understand," (a non-discrete or uncountable object) we refer to it as a singular. The water in the ocean, the stars in the sky, sand on the beach, etc.
The number of gallons of water in the ocean.
The number of stars in the sky.
The number of particles of sand on the beach.
In each of these cases, we can't really know how much of the objects discussed exists. We might estimate it, but we can't really know. When this happens we treat the object as singular.
Note #2
I thought this was a curious example for the linked website to use. It's right, but for a very different reason than was presented in Note #1.
The number of products at the fruit stand.
The number of products in our warehouse.
The number of products on my desk.
The idea behind the word "products" isn't so great that it can't be counted (like "stars in the sky"). It's because the word "products" is one of those words that's just used that way. This issue is something similar to using the words "deer" and "sheep" as their own plurals. Why do we do that? Well... because we do. The word "products" is intrinsically uncountable.
The number of deer in the forest.
The number of sheep in the field.
And if you think that's funny, using the word "product" in the same way as "deer" and "sheep" is becoming more popular.
she uses product in her hair.
We shipped a lot of product this month.
Language changes... and this is a particularly good example of that change.