Simplify entries count calculation

SUP-814 #time 1h