How to Apply for University in USA – How Many and Which Ones?

I’m planning to apply for graduate school in the USA for Computer Science, but I’m struggling to decide how many universities I should apply to and how to pick the right ones. I don’t want to apply to too few and risk rejection, but too many seems overwhelming. Any advice on finding the right balance?