Yes, it will then rerun facts after facter is installed so you will get facters fact in the current run.
If gather_facts is true, you will run gather facts two time every time you run the play.
If this is not desired you could also do it like this
- name: install facter
yum:
name: facter
state: latest
register: installed_facter
- setup:
when: installed_facter | changed