fixed missing conditions error
added parameter for SQL COUNT function argument