Israel says it struck a school being used by Hamas militants, but Gazan health officials say more than 20 women and children are among the dead.