There are probably several ways to do this. I would probably do it using the Meraki scanning API.
Basically the scanning API makes the Meraki dashboard send you updates about connected and non-connected WLAN and bluetooth devices seen by your access points. You'll need your own back-end to receive these updates and process them.
If you filter these events by the ssid data element, that will filter out those clients that are not connected and those that are connected to an SSID you're not interested in. Then you just keep a database of the MAC-addresses you see (perhaps hashed for GDPR purposes). A simple count of those rows will then provide the info you need.
More info about the scanning API:
https://documentation.meraki.com/MR/Monitoring_and_Reporting/Scanning_API
I think built-in counters in the dashboard location analytics will probably all be limited in time range.