almost clean; motifs in progress - countOccurences