The battery page in System Settings tells you the condition but not the cycle count. I’d use the terminal when I want the number.
Run this on a MacBook:
ioreg -rn AppleSmartBattery | grep CycleCount
ioreg prints the I/O Registry, the list of hardware the system knows about. -r shows the matching object and everything below it, -n selects it by name, and AppleSmartBattery is the battery. The grep keeps only the line with the count, which looks like "CycleCount" = 123.
Drop the grep and you see everything the battery reports, which is a long list of keys. It is worth scrolling through once to learn what is there.
A caveat: the number alone doesn’t say much. Apple publishes how many cycles each Mac model is designed for, and the battery condition in System Settings is based on more than the count. Use the count together with that, not instead of it.
If you only want the condition and the count in a friendlier layout, system_profiler SPPowerDataType prints both. On a desktop Mac there is no battery object, so the command prints nothing.
Further reading: ioreg man page overview (ss64)