Validate the number of parameters for prepared statements - fixes #47