Return 0 from getResultsCount for empty response

#69

I didn't touch `getIndex` because 0 is a valid index, at least for matches, so it seems like undefined is okay there.