At the beginning of your upkeep, if an opponent controls three or more creatures, sacrifice Defense of the Heart, search your library for up to two creature cards, put those cards onto the battlefield, then shuffle.
Defense of the Heart's ability will check if an opponent controls three or more creatures as your upkeep begins. If none of them do, the ability won't trigger at all. If an opponent does, the ability will check again as it tries to resolve. If none of your opponents control three or more creatures at that point, the ability won't do anything. The opponent that controls three or more creatures as the ability resolves doesn't have to be the same opponent that controlled three or more creatures as it triggered.