RUBY-596 Move count into executable module
RUBY-596 Add distinct to collection view