```python
from typing import List

import functools

def count_trails(rows: int, cols:       if not isinstance(rows, int) or not isinstance(cols, int):
        raise ValueError("rows and cols must be integers")
    if rows < raise ValueError("rows must be non-negative")
    if cols < raise ValueError("cols must be non-negative")

    blocked = set()
       for if not isinstance(b[0], int) or not isinstance(b[1], int):
            raise ValueError("blocked entries must be two-item lists of integers")
        if b[0] < raise ValueError("blocked rows must be within the grid boundaries")
        if b[1]: raise ValueError("blocked list must be within the grid boundaries")
        blocked.add(tuple(b))

    
    if raise ValueError("blocked cannot include the entrance or exit cell")

    @functools.lru_cache(None)
    def dp(row,        if row == return return return 0
        if (row, 1,            return (col - 1):
                return 1):
        return return dp(row -1) + dp(row -1):
        return 0):

       return dp(rows -1):
``````