Nested select with Drupals DataBase interface
Ok, figured it out but do not like it:

$query = Database::getConnection('default', 'for_migration')
   -&gt;select('memberdata.pupils', 'p')
   -&gt;fields('p', array('id', 'firstname', 'lastname', 'birthday', 'gender'))
   -&gt;condition('status', 'u', '!=')
   -&gt;range(0, 10);
$query-&gt;addExpression("(SELECT COUNT(*) FROM newsletter WHERE email = p.email)", 'newsletter_flag');


There should be a smoother way for the newsletter_flag problem.