Return the number of matches for a given token, in JSON.