Saying that keyword density no longer matters is overstating things a bit. It's more that extreme keyword density values (less than 0.5% or over 3%) will hurt you, but values within a sane range won't help you much. Let's look at the reasons for this.
(The chart above assumes a sound SEO strategy)
The Panda Update
As with many other SEO strategies, Google's Panda update made density-based SEO approaches obsolete. Panda penalizes approaches used by spammers and content farms, and keyword stuffing was one of the most often used strategies in the spammer's bag of tricks. Fortunately, Google is smart, and that brings us to...
Google prefers natural, readable texts. Using the same word over and over again makes you sound like a complete idiot not only to humans, but to Google's crawling bots, as well. That's why it's important to use not only your primary keywords, but also synonyms and semantically related words. If your primary keyword is "pet supplies," for example, Google is smart enough to rank your site for things like "pet food," "dog treats," and "fish tanks" even if you mention them indirectly (i.e. not using those exact phrases in your copy.).. This isn't foolproof, though. Always use either your web host's analytics or a third-party SEO package to see how people are actually reaching your site and adjust accordingly.