simplified NrParts() function -KL

simplified and tested, no bugs.