كَمْ مِنْ رَجُلٍ لَقِيتَهُ؟ — How many men did you meet?
كَمْ: interrogative, indeclinable; its position depends on the governing structure.
مِنْ: preposition.
رَجُلٍ: genitive after min; the phrase specifies what kam counts.
لَقِيتَ: past verb with second-person subject; هُ: object pronoun.
The kasrah on rajulin is caused by min, not by declarative kam.