### Summary

I did not find this bug reported when I tried searching for it previously, so I am reporting it here.

Problem:
When using a block: rescue: in Ansible 7.1.0 (Core 2.14.1), any failures in the rescue: are considered another rescue in the "PLAY RECAP" "rescued=" counter, causing "failed=" to not be incremented correctly. Luckily the host still fails internally and will not continue performing tasks however to the user its as if not nothing failed at all considering the PLAY_RECAP shows "failed=" as not being incremented.

Expectation:
When using the block: rescue:, the "rescue=" and "failed=" PLAY RECAP values should be incremented in such a way that "rescue=1" and "failed=1" as it acts in Ansible 6.5.0 (Core 2.13.7) and not "rescue=2", "failed=0" as it currently does in Ansible 7.1.0 (Core 2.14.1)


During my small amount of testing I found the issue to be the is_any_block_rescuing() function in executor/play_iterator.py. Since its change from 2.13.7 to 2.14.1, it now checks whether its currently in a rescue block based on the condition "if state.get_current_block().rescue:" instead of checking its state. When changing it back to the original first condition check in 2.13.7 "if state.run_state == IteratingStates.RESCUE:", I was able to replicate the original results that were expected and received in 2.13.7.

For awareness I do not certify this as the guaranteed fix as my testing was minimal.


### Issue Type

Bug Report

### Component Name

executor/play_iterator.py

### Ansible Version

```console
$ ansible --version
ansible [core 2.14.1]
  config file = None
  configured module search path = ['/home/<USERNAME>/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/<USERNAME>/.local/lib/python3.10/site-packages/ansible
  ansible collection location = /home/<USERNAME>/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/<USERNAME>/.local/bin/ansible
  python version = 3.10.7 (main, Oct  1 2022, 04:31:04) [GCC 12.2.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
```


### Configuration

```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
CONFIG_FILE() = None
```


### OS / Environment

Ubuntu 22.04
And Tested on
WSL Kali GNU/Linux 2022.1

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- hosts: localhost
  tasks:
    - block:
        - debug:
            msg: "{{ asdasd }}"
      rescue:
        - debug:
            msg: "{{ ansible_failed_task }}"
        - debug:
            msg: "{{ pppp }}"
# OR 
- hosts: localhost
  tasks:
    - block:
        - debug:
            msg: "{{ asdasd }}"
      rescue:
        - debug:
            msg: "{{ ansible_failed_task }}"
        - fail:
            msg: "rescued"
```


### Expected Results

In Ansible 6.5.0 (Core 2.13.7), "failed=1" and "rescued=1" for the steps to reproduce, while in ansible 7.1.0 (Core 2.14.1) it shows "rescued=2" and "failed=0".

### Actual Results

```console
ansible-playbook [core 2.14.1]
  config file = /home/<USERNAME>/projects/ansible/ansible.cfg
  configured module search path = ['/home/<USERNAME>/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/<USERNAME>/.local/lib/python3.10/site-packages/ansible
  ansible collection location = /home/<USERNAME>/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/<USERNAME>/.local/bin/ansible-playbook
  python version = 3.10.7 (main, Oct  1 2022, 04:31:04) [GCC 12.2.0] (/usr/bin/python3)
  jinja version = 3.1.2
  libyaml = True
Using /home/<USERNAME>/projects/ansible/ansible.cfg as config file
setting up inventory plugins
host_list declined parsing /home/<USERNAME>/projects/ansible/hosts as it did not pass its verify_file() method
script declined parsing /home/<USERNAME>/projects/ansible/hosts as it did not pass its verify_file() method
auto declined parsing /home/<USERNAME>/projects/ansible/hosts as it did not pass its verify_file() method
Parsed /home/<USERNAME>/projects/ansible/hosts inventory source with yaml plugin
Loading callback plugin default of type stdout, v2.0 from /home/<USERNAME>/.local/lib/python3.10/site-packages/ansible/plugins/callback/default.py
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.

PLAYBOOK: testing.yml **********************************************************
Positional arguments: testing.yml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/home/<USERNAME>/projects/ansible/hosts',)
forks: 5
2 plays in testing.yml

PLAY [localhost] ***************************************************************

TASK [Gathering Facts] *********************************************************
task path: /home/<USERNAME>/projects/ansible/testing.yml:1
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: <USERNAME>
<127.0.0.1> EXEC /bin/sh -c 'echo ~<USERNAME> && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/<USERNAME>/.ansible/tmp `"&& mkdir "` echo /home/<USERNAME>/.ansible/tmp/ansible-tmp-1673393142.3067427-3561-14584735740540 `" && echo ansible-tmp-1673393142.3067427-3561-14584735740540="` echo /home/<USERNAME>/.ansible/tmp/ansible-tmp-1673393142.3067427-3561-14584735740540 `" ) && sleep 0'
Using module file /home/<USERNAME>/.local/lib/python3.10/site-packages/ansible/modules/setup.py
<127.0.0.1> PUT /home/<USERNAME>/.ansible/tmp/ansible-local-3556vcjpazw1/tmp5pmc_5id TO /home/<USERNAME>/.ansible/tmp/ansible-tmp-1673393142.3067427-3561-14584735740540/AnsiballZ_setup.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /home/<USERNAME>/.ansible/tmp/ansible-tmp-1673393142.3067427-3561-14584735740540/ /home/<USERNAME>/.ansible/tmp/ansible-tmp-1673393142.3067427-3561-14584735740540/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3 /home/<USERNAME>/.ansible/tmp/ansible-tmp-1673393142.3067427-3561-14584735740540/AnsiballZ_setup.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/<USERNAME>/.ansible/tmp/ansible-tmp-1673393142.3067427-3561-14584735740540/ > /dev/null 2>&1 && sleep 0'
ok: [localhost]

TASK [debug] *******************************************************************
task path: /home/<USERNAME>/projects/ansible/testing.yml:4
fatal: [localhost]: FAILED! => {
    "msg": "The task includes an option with an undefined variable. The error was: 'asdasd' is undefined. 'asdasd' is undefined\n\nThe error appears to be in '/home/<USERNAME>/projects/ansible/testing.yml': line 4, column 11, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n    - block:\n        - debug:\n          ^ here\n"
}

TASK [debug] *******************************************************************
task path: /home/<USERNAME>/projects/ansible/testing.yml:7
ok: [localhost] => {
    "msg": {
        "action": "debug",
        "any_errors_fatal": false,
        "args": {
            "msg": "{{ asdasd }}"
        },
        "async": 0,
        "async_val": 0,
        "become": false,
        "become_exe": null,
        "become_flags": null,
        "become_method": "sudo",
        "become_user": null,
        "changed_when": [],
        "check_mode": false,
        "collections": [],
        "connection": "ssh",
        "debugger": null,
        "delay": 5,
        "delegate_facts": null,
        "delegate_to": null,
        "diff": false,
        "environment": [
            {}
        ],
        "failed_when": [],
        "finalized": true,
        "ignore_errors": null,
        "ignore_unreachable": null,
        "loop": null,
        "loop_control": {
            "extended": null,
            "extended_allitems": true,
            "finalized": false,
            "index_var": null,
            "label": null,
            "loop_var": "item",
            "pause": 0,
            "squashed": false,
            "uuid": "00155d9c-3005-7d48-6a63-00000000001d"
        },
        "loop_with": null,
        "module_defaults": [],
        "name": "",
        "no_log": null,
        "notify": null,
        "poll": 15,
        "port": null,
        "register": null,
        "remote_user": null,
        "retries": 3,
        "run_once": null,
        "squashed": true,
        "tags": [],
        "throttle": 0,
        "timeout": 0,
        "until": [],
        "uuid": "00155d9c-3005-7d48-6a63-000000000004",
        "vars": {},
        "when": []
    }
}

TASK [debug] *******************************************************************
task path: /home/<USERNAME>/projects/ansible/testing.yml:9
fatal: [localhost]: FAILED! => {
    "msg": "The task includes an option with an undefined variable. The error was: 'pppp' is undefined. 'pppp' is undefined\n\nThe error appears to be in '/home/<USERNAME>/projects/ansible/testing.yml': line 9, column 11, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n            msg: \"{{ ansible_failed_task }}\"\n        - debug:\n          ^ here\n"
}

PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=2    ignored=0
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
"""Pretty Print"""
        try:
            result = self.evaluate(args)
            display.display(pprint.pformat(result))
        except Exception:
            pass
    do_p = do_pprint
    def execute(self, args):
        try:
            code = compile(args + '\n', '<stdin>', 'single')
            exec(code, globals(), self.scope)
        except Exception:
            t, v = sys.exc_info()[:2]
            if isinstance(t, str):
                exc_type_name = t
            else:
                exc_type_name = t.__name__
            display.display('***%s:%s' % (exc_type_name, repr(v)))
            raise
    def default(self, line):
        try:
            self.execute(line)
        except Exception:
            pass