As far as I know, there is no way to determine the article count method ($wgArticleCountMethod = 'link' or 'any') of a particular wiki via the API. This should be changed.
Reasoning: The article count itself can be found through the API using an "siprop=statistics" query. Identifying the wiki's content namespaces can be done with an "siprop=namespaces" query. But in order to understand which pages will actually be counted as articles / content pages, one needs to know the wiki's article count method, which currently seems not to be available through the API.