Add count option, logic, and documentation.