Translation:How many young men are in your Hawaiian language class?
Yes, you are probably right. But that is not really the point of the sentence. Familial relationships are quite specific to both age and gender. This sentence uses the phrase "kāne 'opio", referring to a younger cousin who is also male. There is no equivalent in English. I am sure that Duolingo would love it if its students generated their own sentences using these key phrases.
Translating "in" = i to me sounds like English thinking dressed up in Hawaiian words. I remember seeing a sentence in the story La'ieikawai: 'O au wale no ko ka hale nei/Only I am in the house. How I would have asked how many young men were in your Hawaiian language class: ʻEhia kāne ʻōpio o kāu papa ʻōlelo Hawaiʻi?