I think this is what you want, this will give you all the data in rows:
select ost_ticket.ticket_id, ost_ticket.number, ost_ticket.status_id, ost_staff.username, ost_staff.staff_id
from ost_ticket
join ost_staff on ost_staff.staff_id = ost_ticket.staff_id
where ost_ticket.status_id in (1,7,8,9);
If you want a count, you'd need another select:
select count(t.num), t.staffname
from (
select ost_ticket.number as num, ost_staff.username as staffname
from ost_ticket
join ost_staff on ost_staff.staff_id = ost_ticket.staff_id
where ost_ticket.status_id in (1,7,8,9)
) as t
group by t.staffname;
If you want to expand ticket status you can add it to the outer query and the group by. If you need help with that, I'm happy to help.