Fixed counting exception

Fixed "Invalid parameter number: number of bound variables does not match number of tokens " exception during execution count on Query where select part of query contains :parameters.
Missing docblocks: also, please put the brace on a new line