compute ap sign counts