select research_papers.*, (select count(*) from attachments where attachments.item_id = paper_id) as n_shares from research_papers where author_id = :user_id