input: from typing import List
  from collections import Counter
  
  def most_frequent_elements_total(nums: List[int]) -> int:
      """
      You are given a list of positive integers called nums.
  
      Return the sum of the frequencies of those elements in nums that appear with the highest frequency.
  
      Frequency refers to how many times an element appears in the list.
  
      Examples:
      >>> nums = [1,2,2,3,1,4]
      4
      >>> nums = [1,2,3,4,5]
      5
  
      Constraints:
      1 <= len(nums) <= 100
      1 <= nums[i] <= 100
      """
output:     counter = Counter(nums)
      max_freq = max(counter.values())
      return sum(count for count in counter.values() if count == max_freq)