Shelving-style QND phonon-number detection in quantum optomechanics