Single query to return counts over different IDs in a single record
Similar to @ypercubes but to get one row without 3 separate queries

select
     count(CASE WHEN pub_id = '1389' THEN title_id END) as algodata,
     count(CASE WHEN pub_id = '0877' THEN title_id END) as binnet,   
     count(CASE WHEN pub_id = '0736' THEN title_id END) as newmoon  
from titles
where pub_id IN ('1389', '0877', '0736') 


Also, decide if your values are numbers or strings and be consistent to avoid datatype conversions