My BS was in Math, and I'm almost finished with my Master's in CS. At the time of my application, I had finished all the lower division CS courses, but no upper division.
You will find that Math is excellent prep for CS, and that CS departments recognize this. To do well in upper division math, you need to be able to think logically and abstractly, which are both valuable in CS. In many ways, math and programming are the same -- you have a starting condition, you have a set of rules you can use, and you have a desired end point. You would like to get there in an elegant manner, without too many missteps, and in a manner that others can understand.
In the US at least, most schools that I looked at assume that their MS students will be lacking one or more required upper division CS classes, and have provisions for those students to take those classes. The year I entered, out of 80 students only one had all the required upper division classes. I don't think you'll find this is a problem. However, the more you have, the better you will look compared to others.
Your best bet is to call up the graduate coordinator for CS at the schools you are considering, and discuss things with them. They won't make any guarantees, but the can give you a good sense of whether you are wasting your time applying at that school, and often will give you hints on things you can do to make yourself a stronger applicant.