See if these paths to the row count variables work:
data.d.query.PrimaryQueryResult.RelevantResults.RowCount
data.d.query.PrimaryQueryResult.RelevantResults.TotalRows
If you have specific questions about the object model, I find that the best first point of reference is to look at the returned xml or json using web developer tools and looking at the returned object graph.