function countNonPushOnlyOPs(value) {
  return value.length - value.filter(isPushOnlyChunk).length;
}
Counts the number of non-push-only opcodes in a stack.

@param value - The stack to analyze.
@returns The count of non-push-only opcodes.