Alternatively one can use omega (or bigomega to count prime factors with multiplicity) functions from GP:
sage: gp.omega(234)