If you mean you use those words in cooking, we rather say like:
にんにく一玉【ひとたま】 or 一房【ひとふさ】: "a ball/bunch of garlic" = "a garlic bulb"
にんにく一片【ひとかけ】: "a chip of garlic" = "a garlic clove"
In your case, "2 garlic cloves" will be にんにく二片【ふたかけ】.
Or if you refer to "a garlic bulb" in the context of ...
As @rebuuilt notes, ニンニク and にんにく are the same word written in two different syllabaries ("alphabets"). (There also exists a rarely used kanji representation 大蒜.)
The most common way to refer to a single clove of garlic is
(or using kanji for the number: 一片) which can be read either ひとかけ hitokake or いっぺん ippen.
I think for a bulb of garlic one ...
ニンニク (katakana syllabary) and にんにく (hiragana syllabary) are two different but equivalent ways of writing the same thing: garlic.
garlic: ニンニク or にんにく
garlic clove: ニンニクのひとかけ (based on this website: https://gourmet-note.jp/posts/2607)
garlic bulb: ニンニクの球根 or ニンニクの鱗茎 (I think 鱗茎 is a more specific term)