كَمْ غُلَامًا مَلَكْتَ؟ — How many servants did you own?
كَمْ: fronted direct object, in the accusative position.
غُلَامًا: accusative tamyīz identifying what is counted.
مَلَكْتَ: past verb and second-person subject.
The governing verb here means “possessed or owned.” The case pattern matches «كَمْ رَجُلًا ضَرَبْتَ».