Firstly you shouldn't call mysql_num_rows on the querystring itself.
$result= mysql_query($query);
$num_rows = mysql_num_rows($result);
echo $num_rows;
Secondly to get the amount of Approved ads AND the amount of all ads sold, you will need to do 2 queries.
The first one stays the same to get all approved ads.
The second is your original query
$query = "SELECT * FROM ad_order WHERE cust_id='$table_id' AND status != '99'"
Then do the same with this query to obtain the amount of ADS (Total) sold to the particular customer.