Which publications actually count for tenure?
I can't speak for your field or institution, so take anything I say with that in mind. 

That being said, in my experience (in computer science, at a well-ranked private university) what matters is not so much who you collaborate with, but that you have a research agenda that is strongly identified with you (as opposed to your senior coauthors). If all of your papers are coauthored with the same senior researcher, this can look bad, because it can be difficult to disentangle your research agenda from his or hers. But if your papers have a cohesive theme, and are coauthored with a variety of other people (even if many are senior), this is great. 

So in summary, in the parts of academia I have seen, you should collaborate with whoever you want to, but make sure you have your own research problems and are not just working on your coauthor's problems.