Add frequency count to extra::stat. #8281
auto merge of #8320 : mihneadb/rust/freq_count, r=cmr