Why is shahrin genitive in «كَمْ شَهْرٍ صَوْمِي»?

Al-Kināyāt — Kam, its Tamyīz and Syntactic Positions