Counting stable cycles in unimodal iterations