instruction: How many papers does james fogarty have in chi ?
response: SELECT DISTINCT COUNT(paper.paperid) FROM author, paper, venue, writes WHERE author.authorname = 'james fogarty' AND venue.venueid = paper.venueid AND venue.venuename = 'chi' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid