The number of clicks needed to complete the task will depend not only on the design, but also on the task complexity — so an absolute number, applicable for all tasks, is not possible.
Not all clicks are equal: some result in long wait times (if, for example, a new page is loaded) and others are instantaneous — for instance, if an accordion is expanded.
...there are many aspects of the design that contribute to its usability, whether the task flow involves 2 clicks or 10...
3-Click Rule Pushes Toward Overly Broad Navigation UIs
Ensure that menu items have names with strong information scent and avoid vague, unfamiliar, or branded terms.
Include clear wayfinding (e.g., breadcrumbs, local subnavigation) that shows users where they currently are in the IA.
Avoid multilevel hierarchical dropdown menus (on desktop) in favor of mega menus.
Identify the most important information-seeking tasks, and surface links to them from the homepage and from other important pages.
For pathways that do involve multiple steps, provide clear landing pages or navigation hubs at key points along the way.
Make sure that when a click results in a new page, the page load time is minimal.
More Stuff I Think