HNumOfChannels (see figure 5.39) returns for the first input iconic parameter of a HALCON operator the number of channels of the image object with the index obj_index. Thus, this routine is just a shortcut for using HPNumOfChannels as defined in figure 5.5 with par_num = 1.
Note that HNumOfChannels automatically checks the result state of the underlying procedure with the macro HCkP. Thus, you must not use HCkP on HNumOfChannels yourself.