I'm writing a program in Python that outputs information about Wordpress installations and I'm adding some features to detect Multisite installations and their details. I would like it to print how many sub-installations(?) exist in one multisite, but I'm not sure how to go about that.
I think the built-in Wordpress function equivalent to what I need would be:
return get_site_option( 'blog_count' );
But I need a way to do that without PHP and I can't figure out what query Wordpress is running for that. I figured it would be stored in wp_options but nada.
How I'm getting the count now (example):
$ mysql -e "show tables from $database" | grep -c comments 3
because I figure each installation is going to have its own comments table. Ideally I'm just looking for a plain number stored in the database somewhere that says how many installations exist.
I'm not a Wordpress person so sorry if I'm scrambling any lingo here. Any help appreciated!