Anything supporting the mastodon API should tell if you run this command (substituting in your instance's host name):
curl -L https://<your-instance-here>/api/v1/instance/peers | jq '.[]' | wc -l
I don't know if this metric includes and/or distinguishes between instances added via relay.