better result count in REST stores and AbstractRepository