Skip to main content
2 of 4
deleted 785 characters in body
Leaky Nun
  • 50.1k
  • 6
  • 110
  • 284

Jelly, 5 bytes

ÆfI¬S

Try it online!

Port of Luis Mendo's answer in MATL.

ÆfI¬S

Æf     Implicit input. Obtain prime factors, sorted and with repetitions
  I    Consecutive differences
   ¬   Logical negate: zeros become 1, nonzeros become 0
    S  Sum. Implicit display
Leaky Nun
  • 50.1k
  • 6
  • 110
  • 284