Using bash/terminal to get number of battery recharge cycles
Something like
system_profiler SPPowerDataType | grep &quot;Cycle Count&quot; | awk '{print $3}'

should do the job.
system_profiler SPPowerDataType | grep &quot;Condition&quot; | awk '{print $2}'

will get you the battery condition, for example: Normal.
If you want more output, run:
system_profiler SPPowerDataType | grep -A3 -B7 &quot;Condition&quot;

to get something similar to this:
      Charge Information:
          Charge Remaining (mAh): 2405
          Fully Charged: No
          Charging: No
          Full Charge Capacity (mAh): 3816
      Health Information:
          Cycle Count: 187
          Condition: Normal
      Battery Installed: Yes
      Amperage (mA): -2635
      Voltage (mV): 11212