Modify get number of repositories algorithm. Close #33