SELECT COUNT ( * ) FROM `wp3_term_relationships` , `wp3_posts` WHERE `wp3_posts` . `ID` = `wp3_term_relationships` . `object_id` AND `post_status` = ? AND `post_type` IN (?) AND `term_taxonomy_id` = ? 