Pass the bind parameter for the insert statements
Modify the count statement to use the UNION clause