Sunyaev–Zel’dovich power spectrum and cluster numbers from an extended merger-tree model