Hi, i am having problem of my query, I want to count how many records of employee having this permitno='10000000000' and also in the empoyeedetail i want also to count and sum to the result of the first queried table

how do i use union all in this query?

Activity
Code:
  
  ACTNO       EMP_PERMITNO
     6                10000000000
     6                10000000000
     6                10000000000
     6                10000000000
     5                10000000010
EMPREFERENCE
Code:
  
 EMPNO              EMP_PERMITNO
     005                10000000000
     006                20000000000
     007                10000000000
     008                10000000000

EMPLOYEEDETAIL
Code:
    EMPDETNO        EMP_PERMITNO
     111                10000000000
     112                20000000000
     113                10000000000
     114                10000000000

Here is my code

Code:
 
SELECT count(*)as number from
activity act inner join empreference ref
on act.emp_permitno = ref.emp_permitno
where act.emp_permitno = '10000000000'

union all
SELECT count(*)as number from employeedetail
where emp_permitno = '10000000000'