Move commit_list_count() to commit.c