How can I create functions to extract average and count from the given data objects

join shbcf.ru