When it comes to pupils packing cellphones at school, Mayor Bill de Blasio has the right number.

He wants to make phones permissible once again in the halls of New York City's 1,700 schoolhouses -- and we think he should follow through with dispatch.

The ban imposed by then-Mayor Michael Bloomberg in 2006 has proven neither popular nor practical.

The Bloomberg administration grumbled that pupils used cellphones to cheat on tests, to summon gang members to bloody sidewalk brawls, and to snap illicit locker-room shots of classmates, among other things.

The answer to those issues is to dial up the discipline -- in hallways, on school grounds and in classrooms -- but not to ban phones. Why limit communications between concerned parents and their kids because school honchos fear mayhem? That causes more problems than it solves.

And it's essentially a cop-out, valuing administrative ease over legitimate parental concern. More than a few parents call cellphones their family lifelines. They're also known as the umbilical cord that lasts into adolescence.

It helps that de Blasio is a public school parent himself -- and incredibly, it seems -- the first New York mayor ever to have a child in public schools while in office.

As a Park Slope councilman in 2006, he pointed out that a cellphone helped him stay in touch with his daughter, Chiara, who was then a public school student. Today his son, Dante, attends Brooklyn Technical High School -- where a kind of don't-ask-don't-tell policy seems to reign on the matter of cells.

But kids who attend schools with metal detectors have a tougher time. The security devices seem to catch phones as well as guns. Students must plunk down a dollar a day to store their phones in off-campus trailers and wait in long lines to retrieve them after school.

With his constant wars on trans fats, big sodas and kid-enticing tobacco displays, Bloomberg seemed to yearn for authority over a nanny state. But on the real nanny issue -- constant cellphone contact with mom and dad -- he was tone deaf. The faster de Blasio ends this ban the better.