How to do an embedded select (with count()) with the Drupal 7 database api?
I don't think there's any existing method that will let you add a structured sub-query as an expression, so you're probably going to be left with something like this:

$query = db_select('node', 'n')
  -&gt;fields('n', array('nid'));

$sub_query = '(select count(*) as count from node_cnt nc where nc.nid = n.nid)';
$query-&gt;addExpression($sub_query, 'node_count');

// Build the rest of the query.