For query molecules it is possible to define the number of Hydrogen atoms needed to have in the target structure. Either define it explicitly by adding the Hydrogen atoms to the specified atoms or implicitly by setting implicit hydrogen count. If the implicit hydrogen count is specified then it is stored in the atom and not calculated from the valence any more.
define query implicit hydrogen count
define query explicit hydrogen count