[feat] func for calculating freq of child elements