It is mentioned in many sources that keyword density shouldn't exceed 1-3%, so for a 400 words article it's okay to use the keyword 4-5 times. Otherwise, if you stuff the article with a keyword and overuse it, Google will consider this as a spammy activity, and the consequences of this are well-known.
Also, it's better to put the most of keywords at the beginning of the article and use them in meta descriptions, tags and titles, because this way the keywords are filtered better by Google.
However, I believe that keyword density is not something to be measured precisely, because this is rather indicative. The main rule I rely on is not to overuse the keyword and locate it in strategically important parts of the text.