Is there a maximum number of total hearts one can have?
According to this question the maximum number of red hearts (that is, hearts obtained from either the divine beasts or Goddess Hylia in exchange for spirit orbs) is anywhere from 27 to 30 depending on how much stamina you want.
However, is there a maximum to the number of yellow/temporary hearts one can have depending on the number of red hearts? I.E. Is there a maximum number of total hearts (red and yellow) one can have?
Solution 1:
The maximum number of hearts that you can get, counting both red and yellow, is 30. If you have maxed our your hearts at 30 (thus losing 3 stamina wheel upgrades), you will not be able to gain temporary/yellow hearts although Hearty food will still heal you to max. If you have decided to max out your stamina wheel, you will still be able to get 3 temporary hearts after increasing your hearts gauge to 27.