id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses 19903,wp_count_comments() and get_comments_count() both do SQL queries,markjaquith,,"{{{wp_count_comments()}}} and {{{get_comments_count()}}} are similar functions, with a few differences: * Their results are returned in different formats: * {{{wp_count_comments()}}} returns an object of: * spam * approved * moderated * total_comments * trash * post-trashed * {{{get_comment_count()}}} returns an array of: * spam * approved * awaiting_moderation * total_comments * {{{wp_count_comments()}}} caches, but {{{get_comment_count()}}} always hits the database. * {{{get_comment_count()}}} is used nowhere in WordPress core. I propose that we add 'trash' and 'post-trashed' reporting to {{{get_comment_count()}}}, and then have {{{wp_count_comments()}}} use {{{get_comment_count()}}} instead of doing its own SQL queries. See #6884 and #19901",enhancement,new,normal,3.4,Comments,3.3.1,normal,,,,