A plain apt search ssl returns hundreds of results, because it also matches every description that mentions SSL. When you roughly know the name, search names only.
The search term is a regular expression:
apt-cache search --names-only zstd
apt-cache search --names-only '^php8.3-'
apt-cache search --names-only 'fonts-.*mono'
The first finds everything with zstd in its name, like zstd and libzstd1. The second uses ^ to list all PHP 8.3 extensions, which is a quick way to see whether the one you need is packaged. The third shows how a pattern in the middle narrows things down.
Each result is a name and the short description, one per line, so it pipes well into grep or wc -l.
The short form is -n. I’d stick with apt-cache here rather than apt search, because its output format is stable and safe to use in scripts.
It only searches what your package lists contain. If a package lives in a repository you haven’t added, or the lists are out of date, you won’t find it, so run sudo apt update first on a fresh system. When you’re looking for the package that ships a particular file rather than a name, apt-file is the tool for that.
Further reading: apt-cache(8) manual page