Preheat your oven to 350°F (175°C) and line two baking sheets with parchment paper.
In a large bowl, cream the softened butter and granulated sugar together until the mixture is light and fluffy, about 3 minutes.
Add the eggs one at a time, beating well after each addition, then mix in the vanilla and anise extract or lemon zest.
Gradually add the flour and baking powder, mixing on low speed until a soft dough forms; if the dough feels too sticky, add an extra tablespoon of flour.
Take small portions of dough, about 1 tablespoon each, and roll them into ropes roughly 4 inches long on a lightly floured surface.
Fold the ropes into knots or circles and place them on the prepared baking sheets, spaced 2 inches apart.
Bake for 10 to 12 minutes, or until the bottoms are lightly golden but the tops remain pale.
While the cookies cool on a wire rack, whisk the powdered sugar and lemon juice together in a small bowl until smooth.
Dip the top of each cooled cookie into the glaze and immediately sprinkle with nonpareils before the icing sets.