To search Stack Overflow from alfred app, simply copy and paste below into the alfred search box, when you press enter you shoudl see a dialog asking you to install this custom Search.
alfred://customsearch/Search%20StackOverflow%3A%20%7Bquery%7D/stack/utf8/noplus/http://stackoverflow.com/search?q={query}
Then to use it in alfred simply up the search box and type in stack
and the question your asking.