Attacks that do 0 damage give stacks.
Attacks that result in MISS or INVULNERABLE do not.
As of 4.0, we have 100% frontal accuracy against targets that are the same level or lower, and will not miss unless accuracy debuffs / evasion buffs apply. A lv30 character attacking a lv50, lv60, lv70 dummy will miss.