fix default count on tableless models with non :id primary key