implemented rests*
found a bug in count*