How much do senior grades count?

If someone were to take fewer APs junior year but take a lot senior year, would the senior grades matter to college? Like if it looked bad to have less APs junior year, would the APs senior year make it up? Thanks in advance!