code for breath counter