I am not sure exactly what you're trying to do.
It's not normal to calculate averages in exporters. Instead you log the raw values, and calculate averages using PromQL queries, e.g.
avg_over_time(foo[30m])
If you want pre-calculated averages, then you do this with recording rules. It means the exporter doesn't have to care about what period you want to average over, and you can generate averages over multiple time periods at once.
sum_sth/count_sth would not be a useful thing to do in the exporter anyway, since it would only give you the average since the time the exporter started running, which could be months or years, or it could be a very short time period if the exporter was recently restarted.