Add paritions count check before and after creating them, as fdisk does not report invalid parameters as errors