def count_objects(self):
cmd_count = ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>']<EOL>outs = self._exec(cmd_count, cwd=self.dirpath, env=self.gitenv)<EOL>outs = outs.decode('<STR_LIT:utf-8>', errors='<STR_LIT>').rstrip()<EOL>try:<EOL><INDENT>cobjs = {k: v for k, v in (x.split('<STR_LIT>') for x in outs.split('<STR_LIT:\n>'))}<EOL>nobjs = int(cobjs['<STR_LIT:count>']) + int(cobjs['<STR_LIT>'])<EOL><DEDENT>except KeyError as e:<EOL><INDENT>error = "<STR_LIT>"% e.args[<NUM_LIT:0>]<EOL>raise RepositoryError(cause=error)<EOL><DEDENT>except ValueError as e:<EOL><INDENT>error = "<STR_LIT>" % str(e)<EOL>raise RepositoryError(cause=error)<EOL><DEDENT>logger.debug("<STR_LIT>",<EOL>self.uri, str(nobjs))<EOL>return nobjs<EOL>
Count the objects of a repository.

        The method returns the total number of objects (packed and unpacked)
        available on the repository.

        :raises RepositoryError: when an error occurs counting the objects
            of a repository