Although the alternative form clearly shows only three strokes, it is still counted as four strokes when using a Chinese dictionary. Compare 氵 from 水(“water”), 扌 from 手(“hand”), and 忄 from 心(“heart”), all of which are a 3-stroke form from a 4-stroke character.
From Old Japanese. Derivation uncertain. Various theories exist, including derivation from ancient verb 往ぬ(inu, “to leave, to be gone”), from the way a dog will guard the house while the master is away; from a compound of 家(ie, “house, home”) + 寝(nu, “to sleep”, ancient monosyllabic form of modern 寝るneru); from ancient Japanese 狗(enu, “puppy, dog”), itself of uncertain derivation; or as a borrowing from some other unknown language.