C++20 introduced the contains method on containers to check if an element is in the container. It can be used instead of the count method now.
I believe it is easier to understand, as contains directly returns a bool indicating whether the element exists, while count returns the number of occurrences of the element, which then often needs to be compared against 0.
Also, it is slightly more efficient than count for this use-case.
This pull request introduces the clang-tidy check readability-container-contains and fixes the instances where count is being used where contains could be used instead. I used the clang-tidy -fix option to do it automatically.