If you wish to obtain the number of results of a query, you can use the getRowCount method.

From your getData call…{d_source,d_entry_page,m_visits}&sort={-m_visits}&space={s:XXXXXX}&period={R:{D:'-1'}}&max-results=50&page-num=1

… just replace getData with getRowCount:{d_source,d_entry_page,m_visits}&sort={-m_visits}&space={s:XXXXXX}&period={R:{D:'-1'}}&max-results=50&page-num=1

This call therefore retrieves 1 piece of information (in the 3 standard formats) indicating the number of rows.

Please refer to this note if you’re using SSO to login to AT Internet services.
Last update: 22/01/2019