Number of publications needed to get into a computer science PhD program?
You don't need any publications to get into a good Ph.D. program.  Publications are often slow, and it's an unexpected bonus for an undergraduate to have publications, not a necessity.  

What is a necessity is to have strong reference letters attesting to your potential for research, and one of the best ways to get those is to get involved in research.  Being involved in research, in turn, will also tend to lead to publications.  Thus, you see the correlation.  Research and research-related activities that help a person into graduate school also tend to help cause that person to end up with publications.

In short: publications aren't the key, they are simply dependent on the same root cause.