def count_through_grid(count, gridwidth):
    """
    Generate row/column indices for a number of intergers.
    :param count: int, how many elements has the grid
    :param gridwidth: int, how wide is the grid
    :return:
    """
    row = int(count / gridwidth)
    column = count - row * gridwidth
    return row, column