Do you have this 4 lines of code?
require 'mechanize'
require 'nokogiri'
a = Mechanize.new
total_google_results = Nokogiri::HTML.parse(a.get("http://www.google.com/search?q=my+keyword").body).xpath(".//*[@id='resultStats']").text.match(/(\S+)\sresult/)[0].tr!(' result', '').tr!(',', '')
>>> web.grab('http://www.google.com/search?q=reddit').single_xpath('//div[@id="resultStats"]/string()')
I really should git push python-web improvements...