I'm focusing on a wordpress platform, while producing a mysql query I wish to display the amount of rows from that question. A good example is proven below.

$query = ("SELECT wp_posts.ID, wp_term_relationships.object_id
     FROM wp_posts
     LEFT JOIN wp_term_relationships ON wp_posts.ID = wp_term_relationships.object_id
     WHERE post_date <= '$now'
     AND term_taxonomy_id = '$catid'
     AND post_date >= '$then' 
     AND post_status = 'publish'");

Now after i generate this question into phpmyadmin, it provides the following output Showing rows - 5 (6 total, Query required .0013 sec)

I wish to display the amount of rows i-e 6 total ... what exactly function i have to use to show it ??

$query = ("SELECT count(*), wp_posts.ID, wp_term_relationships.object_id
 FROM wp_posts
 LEFT JOIN wp_term_relationships ON wp_posts.ID = wp_term_relationships.object_id
 WHERE post_date <= '$now'
 AND term_taxonomy_id = '$catid'
 AND post_date >= '$then' 
 AND post_status = 'publish'");