Right
果 supplies the sound (guǒ → kē, with initial shift).
果 also carries a faint semantic echo — fruit comes from trees, the very things
棵 counts. Phonetic with light semantic alignment. Same phonetic in
颗 (measure word for small round things) and
课 (lesson).