```python
def new_canvas(rows: int, cols: int) -> dict:
    if isinstance(rows, bool) or not isinstance(rows, int) or rows < 1:
        raise ValueError("canvas dimensions must be positive integers")
    if isinstance(cols, bool) or not isinstance(cols, int) or cols < 1:
        raise ValueError("canvas dimensions must be positive integers")
    cells = [[0] * cols for _ in range(rows)]
    return {"rows": rows, "cols": cols, "cells": cells}


def stamp_rect(canvas: dict, rect: list) -> int:
    top, left, bottom, right = rect
    if not isinstance(rect, list) or len(rect) != 4:
        raise ValueError("rect must be a list of exactly four integers")
    if top >= bottom or left >= right:
        raise ValueError("rect covering no cells because top does not sit strictly above bottom or left strictly before right")
    if top < 0 or bottom >= canvas["rows"] or left < 0 or right >= canvas["cols"]:
        raise ValueError("rect reaching off the canvas")
    inked = 0
    for r in range(top, bottom):
        for c in range(left, right):
            if canvas["cells"][r][c] == 0:
                canvas["cells"][r][c] = 1
                inked += 1
    return inked


def ink_total(canvas: dict) -> int:
    total = 0
    for row in canvas["cells"]:
        total += sum(row)
    return total
```