Step 1: Filter the project tasks as desired, being sure to hide all summary tasks. To do so, ensure the Project Summary Task and Summary Task fields are unchecked.
Step 2: Click the Task Count Widget icon. The widget will calculate the number of tasks displayed.