check if numResults is present before counting number of results