The GetRowCount function is used to obtain the number of lines in an API call:
https://apirest.atinternet-solutions.com/data/v2/html/getData?&columns={d_time_date,d_uv_id,d_page,m_page_loads}&sort={-m_page_loads}&space={s:XXXXXX}&period={R:{D:%27-1%27}}&max-results=50&page-num=1
Replacing the GetData function with GetRowCount will allow you to get the number of rows of your previous query.