refs #7709. count_nonzero not portable.
Merge branch 'feature/7709_stitch1D_improvements' into develop