To retrieve the list of messages (without the replies) in a channel of a team using below API:
https://learn.microsoft.com/en-us/graph/api/channel-list-messages?view=graph-rest-1.0&tabs=http
In "@odata.count" property we can get count of those messages
To get the replies for a message, we need to call the list message replies or the get message reply API.
Thanks,
Prasad Das
If the response is helpful, please click "Accept Answer" and upvote it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.