Preheat oven to 350°F (175°C) and line two baking sheets with parchment paper.
In a large mixing bowl, cream together the softened butter and granulated sugar until light and fluffy.
Add the eggs one at a time, beating well after each addition.
Mix in the ricotta cheese, vanilla extract, and almond extract until smooth.
In a separate bowl, whisk together the flour, baking powder, and salt.
Gradually add the dry ingredients to the wet mixture, stirring until a soft, slightly sticky dough forms.
Drop rounded tablespoons of dough onto the prepared baking sheets, spacing them 2 inches apart.
Bake for 10 to 12 minutes or until the bottoms are lightly golden but the tops remain pale.
Transfer the cookies to a wire rack to cool completely before glazing.
In a small bowl, whisk together powdered sugar, milk, and anise extract until smooth.
Dip the tops of the cooled cookies into the glaze and immediately top with nonpareil sprinkles.
Allow the glaze to set for at least 20 minutes before serving.