from typing import Counter


def latern_fish_growth(laternfish, days, timer=8):
    """Models latern fish growth and returns number of fish after n days"""
    tracker = Counter()

    for i in range(timer + 1):
        tracker[i] = 0

    # starting values of each latern fish
    for i in laternfish:
        tracker[i] += 1

    for day in range(days):

        # new fish to be born
        new_fish = tracker[0]

        # shift fish one day up as day passes
        for i in range(timer + 1):
            tracker[i] = tracker[i + 1]

        # reset fish that spawned a new fish and add spawned fish
        tracker[timer - 2] += new_fish
        tracker[timer] += new_fish

    total_latern_fish = sum(tracker.values())

    return total_latern_fish