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.
this should be a private method. There is no reason to have it in the public API