When no items are selected, Zotero's right-hand pane displays the number of items in the current view, so you can see the number of items in a given library or collection simply by making a selection in the left pane. If items are currently selected, click to another collection and back again to view the item count.
To determine total items, including child attachments and notes, click the items list, press the + (plus) key to expand all parent items, and then either deselect the selected item (Cmd-click (Mac) or Ctrl-click (Windows/Linux)) or use Select All (Cmd-A (Mac) or Ctrl-A (Windows/Linux)). You can press “-” (minus) afterward to collapse all items.
To determine how many top-level items match a search that causes child items to be expanded, click the items list, press the “-” (minus) key to collapse all items, and deselect the selected item with Cmd-click (Mac) or Ctrl-click (Windows/Linux).