"Ile masz jabłek?" is a question directed at one specific person ("How many apples do you have?"), but you've asked how would you say "How many people have apples?" which is very different.
To better understand this, let me give you a full example sentence. This is something you would see in a Polish math schoolbook, for example: "Pięcioro dzieci ma w sumie 15 jabłek. Każde dziecko ma dwa razy więcej jabłek od poprzedniego. Ilu (z nich) ma jabłka?" which means: "Five children have a total of 15 apples. Each child has twice as many apples as the one before. How many (of them) have apples?"
And the answer would be four (1, 2, 4, 8... and the fifth kid has no apples), but that's not the point ;) The point is, if you're referring to the number of people, you'd ask "Ilu?" implying "Ilu z nich?" or "Ilu ludzi?". I only used "Ile" in the first sentence because I mentioned "osób", but if you don't do that and want to say it without using the word "people", it will be "Ilu".
TL;DR - You would still say "ile" because even though you're not mentioning apples, you're clearly referring to them.
Unless I'm forgetting a certain case (someone will correct me if I do), "ilu" will only refer to people (in general) and "masculine humans and their properties". What I mean by that is - masculine identities, masculine professions etc. for example:
- Ilu ludzi? (How many people?) - that's the "in general" part
- Ilu mężczyzn? (How many men?)
- Ilu imigrantów? (How many imigrants?) - that's because the word "imigrant" is masculine
- Ilu nauczycieli? (How many teachers?) - that's because the profession "nauczyciel" is masculine; the female version would be "Ile nauczycielek?"
- Ilu pielęgniarzy? (How many [male] nurses?) - similar as above; if the nurse is female, that would be "Ile pielęgniarek?"
Anything else, that is - female humans, children, feminine and neutral professions, identities and other properties as well as feminine and neutral objects will use "ile", for example:
- Ile kobiet? (How many women?)
- Ile dzieci? (How many children?)
- Ile jabłek? (How many apples?)
- Ile punktów? (How many points?)
All of the above will also work the same way if you're implying it so:
- Ilu spotkałaś? (How many did you meet?) - if referring to people
- Ile masz? (How many do you have?) - if referring to objects, points, degrees of body temperature, trophies etc.
- Ile razy? (How many times?) - note: technically "jeden raz" (one time, when counting repetitions) is a masculine word, but it's not referring to humans, that's why I said "masculine humans" earlier.
- Ile stron? (How many pages/sides?)
I wrote "How many apples have you?", which is perfectly correct British English (also acceptable in British English is "How many apples have you got?"), but I was told the "correct" translation is "How many apples do you have?", which is an American version that means something slightly different in British English. I have noticed in early lessons that this program rejects some British terms.