Added count() function to repository contract.
implemented count in baserepo
implemented count in connection repo