If currSubset is empty
if ( currSubset . length == 0 ) return 0 ; count = 1 ; for ( let element = 0 ; element < currSubset . length ; element ++ ) { count *= frequency [ currSubset [ element ] ] ; } return count ; }