int (@NotNull Repository repository) { if (!(repository instanceof HgRepository)) return 0; return ((HgRepository)repository).getOpenedBranches().size() + ((HgRepository)repository).getBookmarks().size(); }