Kanji Is important if you want to read anything. Learning the number of strokes in a kanji is only helpful for looking them up in a dictionary. Stroke order is much more important to learn.
When writing obviously you must not write extra strokes, nor forgot some either; that is, the exact number is important. But you don't need to "memorize" it. If needed you can always count them.
(It is like in English, a given word has an exact number of letters, if you write too few letters, or too much, it will be mispelled, or even another different word! but you don't need to study "accountability has 14 letters", if you ever need you can count them - like I just did now to write there are 14)