I have written a script that counts every root messages and replies in every team/channel. It uses Microsoft Graph API to get the information needed.
It has two functions. First one creates an HTML report with chat statistics for every channel in each Team. It also gives you a number of total messages in Teams!
Second part outputs the number of total messages in each team to a CSV file. If you run this over time, you could create graphs to measure activity/adoption. If you want to take it to the next level, you could automatically push it to a PowerBI dataset/report. Read how to do that here.
The script can be found over at my GitHub repository here.