def get_counter(counter):
    """
    Increases the counter by 1 and returns the changed list.

    This is a little hack. It works because lists are mutable. So in your
    ``context/home_costs.py`` you would something like this::

        from rapid_prototyping.context.utils import get_counter
        MAIN_ID = 100
        counter = [-1]
        costs = {
            'id': MAIN_ID + get_counter(counter)[0],
            ...
        }

    :param counter: A list which has one item, which is an integer, i.e.
      ``[-1]``.

    """
    counter[0] = counter[0] + 1
    return counter
