function simplePostsCounter($type, $status) { if($type == '') {$type = 'post';} if($status == '') {$status = 'publish';} $foundResults = wp_count_posts($type); return $foundResults->$status; }