Unfortunately, some universities will not count courses taken as undergraduates toward a graduate degree, particularly if you are attending a different university for the graduate degree. If you stay at the same university, it is much more likely that this is possible but it is important to verify your options. Nevertheless, taking graduate courses can be an excellent strategy and a very good selling point for getting into a highly selective graduate program as well as giving you a leg up even if you have to repeat some courses.